summaryrefslogtreecommitdiff
path: root/file.h
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2013-09-25 22:53:53 +0000
committerGuy Harris <guy@alum.mit.edu>2013-09-25 22:53:53 +0000
commit5ee2b14a10b4bf36421a459bd5b6ca5bbdeb783a (patch)
tree4d083c05ea65ebeeaf41e4c0492a3ccc9ed7c08d /file.h
parent9973f5f88077cea5a661f7e46227cc4bf764ca38 (diff)
downloadwireshark-5ee2b14a10b4bf36421a459bd5b6ca5bbdeb783a.tar.gz
Do all checks against the reported length; a packet that wasn't captured
in its entirety due to a snapshot length being specified is not malformed. Instead of checking for the the sum of the offset and the value length being less than the offset, check whether the TLV length is <= 4 and, if so, just quit at that point (that also handles the "value is zero length" case). That makes sure that valuelength isn't negative; given that length is < 65536, valuelength < 65532, so that won't cause offset to overflow, so that means offset won't go backwards. svn path=/trunk/; revision=52220
Diffstat (limited to 'file.h')
0 files changed, 0 insertions, 0 deletions