aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-slsk.c
diff options
context:
space:
mode:
authorChris Maynard <Christopher.Maynard@GTECH.COM>2013-07-11 15:55:52 +0000
committerChris Maynard <Christopher.Maynard@GTECH.COM>2013-07-11 15:55:52 +0000
commit6c371815d3d082367678e0f51d5ed23524b02306 (patch)
treeb8c3e191f011c8397e15a63c1f5775424735fa14 /epan/dissectors/packet-slsk.c
parentb53ced1e6a65bd74899efe9b815f179a6bab2fbc (diff)
Fix an obvious case of incorrectly comparing the return value of tvb_length_remaining() against non-zero instead of greater than zero. There are other questionable uses of tvb_length_remaining() as well ... and maybe these should all be replaced with tvb_reported_length_remaining() as well?
#BACKPORT(1.10,1.8) svn path=/trunk/; revision=50510
Diffstat (limited to 'epan/dissectors/packet-slsk.c')
-rw-r--r--epan/dissectors/packet-slsk.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/epan/dissectors/packet-slsk.c b/epan/dissectors/packet-slsk.c
index 8e923853df..72ce48ac82 100644
--- a/epan/dissectors/packet-slsk.c
+++ b/epan/dissectors/packet-slsk.c
@@ -261,8 +261,9 @@ static gboolean check_slsk_format(tvbuff_t *tvb, int offset, const char format[]
}
if (format[1] == '\0' ) {
- if (tvb_length_remaining(tvb, offset) != 0) return FALSE; /* Checks for additional bytes at the end */
- return TRUE;
+ if (tvb_length_remaining(tvb, offset) > 0) /* Checks for additional bytes at the end */
+ return FALSE;
+ return TRUE;
}
return check_slsk_format(tvb, offset, &format[1]);