summaryrefslogtreecommitdiff
path: root/gnuradio-core/src/python/gnuradio/gruimpl/crc.py
diff options
context:
space:
mode:
Diffstat (limited to 'gnuradio-core/src/python/gnuradio/gruimpl/crc.py')
-rw-r--r--gnuradio-core/src/python/gnuradio/gruimpl/crc.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/gnuradio-core/src/python/gnuradio/gruimpl/crc.py b/gnuradio-core/src/python/gnuradio/gruimpl/crc.py
index 3decd09a29..096863fb5d 100644
--- a/gnuradio-core/src/python/gnuradio/gruimpl/crc.py
+++ b/gnuradio-core/src/python/gnuradio/gruimpl/crc.py
@@ -28,6 +28,8 @@ def gen_and_append_crc32(s):
return s + struct.pack(">I", hexint(crc))
def check_crc32(s):
+ if len(s) < 4:
+ return (False, '')
msg = s[:-4]
#print "msg = '%s'" % (msg,)
actual = gr.crc32(msg)