From 23191ea6e69a69dae906664134180eca1a870cb1 Mon Sep 17 00:00:00 2001 From: Evan Huus Date: Mon, 21 Oct 2013 13:07:19 +0000 Subject: 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 --- epan/dissectors/packet-cdp.c | 1 + 1 file changed, 1 insertion(+) 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)); -- cgit v1.2.3