commit | 836e5bd85531c1bf7ba7e7a73c7358ad732b7d1c | [log] [tgz] |
---|---|---|
author | Ed Swierk <eswierk@bigswitch.com> | Tue Mar 20 11:08:53 2012 -0700 |
committer | Ed Swierk <eswierk@bigswitch.com> | Tue Mar 20 11:13:44 2012 -0700 |
tree | ac99fc2cda375471ba181ca5f5390ec178402bbe | |
parent | 16eff42a95c55079d608512667c9b5d3091ca8d6 [diff] [blame] |
Fix check for incomplete packet
diff --git a/src/python/oftest/controller.py b/src/python/oftest/controller.py index 4251913..92bec56 100644 --- a/src/python/oftest/controller.py +++ b/src/python/oftest/controller.py
@@ -166,7 +166,7 @@ return # Extract the raw message bytes - if (offset + hdr.length) > len( pkt[offset:]): + if (offset + hdr.length) > len(pkt): break rawmsg = pkt[offset : offset + hdr.length]