diff options
author | Evan Huus <eapache@gmail.com> | 2013-10-21 13:07:19 +0000 |
---|---|---|
committer | Evan Huus <eapache@gmail.com> | 2013-10-21 13:07:19 +0000 |
commit | 23191ea6e69a69dae906664134180eca1a870cb1 (patch) | |
tree | 812461c0d92de65cf4fbe7bc3e5d8430fcf794c4 /epan | |
parent | be62b39687b3cdd2a206d5421e26588f90e461aa (diff) | |
download | wireshark-23191ea6e69a69dae906664134180eca1a870cb1.tar.gz |
Don't go into a loop if we find a zero-length line. Fixes
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9312
Anders, this may be related to your recent TVB optimizations, since I don't
think it happened before that? Did you change the behaviour of tvb_find_line_end
or its callees at all?
svn path=/trunk/; revision=52730
Diffstat (limited to 'epan')
-rw-r--r-- | epan/dissectors/packet-cdp.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/epan/dissectors/packet-cdp.c b/epan/dissectors/packet-cdp.c index 36be282927..731f1e8d34 100644 --- a/epan/dissectors/packet-cdp.c +++ b/epan/dissectors/packet-cdp.c @@ -1200,6 +1200,7 @@ add_multi_line_string_to_tree(proto_tree *tree, tvbuff_t *tvb, gint start, blanks[i] = '\0'; while (len > 0) { line_len = tvb_find_line_end(tvb, start, len, &next, FALSE); + if (line_len == 0) next++; data_len = next - start; proto_tree_add_text(tree, tvb, start, data_len, "%s%s", prefix, tvb_format_stringzpad(tvb, start, line_len)); |