Fix the very long loop reported in https://bugs.wireshark.org/bugzilla/show_bug.cgi...
authorJeff Morriss <jeff.morriss.ws@gmail.com>
Mon, 8 Jul 2013 21:12:06 +0000 (21:12 -0000)
committerJeff Morriss <jeff.morriss.ws@gmail.com>
Mon, 8 Jul 2013 21:12:06 +0000 (21:12 -0000)
commit5541c28ae66f2febd02244d5f7ff6dfcead17641
tree0acc7072aa9ffc8418ba5796b08fbc108fc20110
parent2a62d8e8e6cd59419a7fcb6c4d49bb6a1e1a4591
Fix the very long loop reported in https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8911 :

In parseFields() ensure that we have at least one byte so that callers
don't have to protect against it returning an offset which hasn't incremented.

Remove a couple of now-unnecessary length-remaining (aka "will the offset
move?") checks.

In some other checks, use tvb_ensure_length_remaining() rather than calling
tvb_length_remaining() and (potentially) THROWing an exception.  I'm not sure
if these are really necessary now or not...

svn path=/trunk/; revision=50450
epan/dissectors/packet-dis-pdus.c