summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2005-04-30 04:30:32 +0000
committerGerald Combs <gerald@wireshark.org>2005-04-30 04:30:32 +0000
commit6380ee999940353761b80f7b7cd907dcc2cc44ef (patch)
tree03568e151600f48410871a6c10bc685250f42f76
parentb41f8bfb2afcd4156fe30290126b65098d1585b9 (diff)
downloadwireshark-6380ee999940353761b80f7b7cd907dcc2cc44ef.tar.gz
Make sure we don't recurse into oblivion. Fixes bug 147.
svn path=/trunk/; revision=14238
-rw-r--r--epan/dissectors/packet-ldap.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/epan/dissectors/packet-ldap.c b/epan/dissectors/packet-ldap.c
index 4b323cc7bc..fec8c5f920 100644
--- a/epan/dissectors/packet-ldap.c
+++ b/epan/dissectors/packet-ldap.c
@@ -1365,6 +1365,8 @@ static int dissect_mscldap_string(tvbuff_t *tvb, int offset, char *str, int maxl
/* ops its a mscldap compressed string */
new_offset=tvb_get_guint8(tvb, offset);
+ if (new_offset == offset - 1)
+ THROW(ReportedBoundsError);
offset+=1;
dissect_mscldap_string(tvb, new_offset, str, maxlen, FALSE);