aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Meier <wmeier@newsguy.com>2012-05-09 20:39:21 +0000
committerBill Meier <wmeier@newsguy.com>2012-05-09 20:39:21 +0000
commit75f64580532cdffca7b6b1a248a74750da454280 (patch)
treef33d7ca20076a6593002bee5e06f594028021417
parentd5b3acebd191c7c4b7417fa9c57017b095bf4f8c (diff)
From Martin Kaiser:
"attached is a simple fix for CID281213. Although the bug can't crash wireshark, dissect_si_string() is not really fit for handling negative string lengths (and doesn't need to)." https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7243 svn path=/trunk/; revision=42523
-rw-r--r--epan/dissectors/packet-dvbci.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/epan/dissectors/packet-dvbci.c b/epan/dissectors/packet-dvbci.c
index abb07ce1e2..7da99ef795 100644
--- a/epan/dissectors/packet-dvbci.c
+++ b/epan/dissectors/packet-dvbci.c
@@ -1969,7 +1969,8 @@ dissect_si_string(tvbuff_t *tvb, gint offset, gint str_len,
if (!title) /* we always have a title for our strings */
return;
- if (str_len==0)
+ /* str_len==-1 is not supported, we need an actual length */
+ if (str_len<=0)
return;
byte0 = tvb_get_guint8(tvb, offset);