aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-ssl.c
diff options
context:
space:
mode:
authorChris Maynard <Christopher.Maynard@GTECH.COM>2012-07-14 16:29:45 +0000
committerChris Maynard <Christopher.Maynard@GTECH.COM>2012-07-14 16:29:45 +0000
commita4ec2596bc9bd2223936ac45ff3786382f913e08 (patch)
tree5b2bf94927757889896f435374a481c2675fc613 /epan/dissectors/packet-ssl.c
parenta14d130713ee0ead1a21907a8c33150b7be7192d (diff)
If the offset is out of range, just assign to len to 0 so we don't end up passing a huge value to fragment_add().
Fixes Coverity CID 280246: Improper use of negative value. svn path=/trunk/; revision=43712
Diffstat (limited to 'epan/dissectors/packet-ssl.c')
-rw-r--r--epan/dissectors/packet-ssl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/epan/dissectors/packet-ssl.c b/epan/dissectors/packet-ssl.c
index 5d7a4007a6..27a138cc1a 100644
--- a/epan/dissectors/packet-ssl.c
+++ b/epan/dissectors/packet-ssl.c
@@ -972,7 +972,7 @@ again:
*/
if(msp->flags & MSP_FLAGS_REASSEMBLE_ENTIRE_SEGMENT) {
/* The dissector asked for the entire segment */
- len = tvb_length_remaining(tvb, offset);
+ len = MAX(0, tvb_length_remaining(tvb, offset));
} else {
len = MIN(nxtseq, msp->nxtpdu) - seq;
}