aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-scsi.c
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2007-01-25 06:45:09 +0000
committerGerald Combs <gerald@wireshark.org>2007-01-25 06:45:09 +0000
commite7bda1efe4f6e8001c79df9735649740aab91db8 (patch)
tree47c47562a1fc8a12d347842bef1bb0a2deebf275 /epan/dissectors/packet-scsi.c
parent94cf82645215cba924bad90d39de463c3d9c5921 (diff)
Attempt to squelch Coverity CID 222.
svn path=/trunk/; revision=20551
Diffstat (limited to 'epan/dissectors/packet-scsi.c')
-rw-r--r--epan/dissectors/packet-scsi.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/epan/dissectors/packet-scsi.c b/epan/dissectors/packet-scsi.c
index 831492ddd6..99c7ea4726 100644
--- a/epan/dissectors/packet-scsi.c
+++ b/epan/dissectors/packet-scsi.c
@@ -4021,8 +4021,10 @@ dissect_scsi_payload (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
/* Start reassembly */
- if (tvb_length_remaining(tvb, offset) >= 0 &&
- (tvb_length_remaining(tvb,offset) + relative_offset) != expected_length) {
+ if (tvb_length_remaining(tvb, offset) < 0) {
+ goto end_of_payload;
+ }
+ if ((tvb_length_remaining(tvb,offset) + relative_offset) != expected_length) {
more_frags = TRUE;
}
ipfd_head = fragment_add_check(tvb, offset, pinfo,