aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2005-10-24 02:35:43 +0000
committerGuy Harris <guy@alum.mit.edu>2005-10-24 02:35:43 +0000
commiteb2fb526aa9fc949d83d7dfc0c95405611d093e0 (patch)
tree635a58a5ff773631badd78407e7a9b148f377cfa
parentc7e56ef08971e232e99fdc39597b26918fafc8cd (diff)
Don't get caught in an infinite loop if we're stuck at the end of the
captured data. Fixes bug 548. (Also note that we need a better general solution.) svn path=/trunk/; revision=16290
-rw-r--r--epan/dissectors/packet-irc.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/epan/dissectors/packet-irc.c b/epan/dissectors/packet-irc.c
index 0975f41f18..9edc4ffdcc 100644
--- a/epan/dissectors/packet-irc.c
+++ b/epan/dissectors/packet-irc.c
@@ -86,6 +86,17 @@ dissect_irc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
* Find the end of the line.
*/
linelen = tvb_find_line_end(tvb, offset, -1, &next_offset, FALSE);
+ if (next_offset == offset) {
+ /*
+ * XXX - we really want the "show data a
+ * line at a time" loops in various
+ * dissectors to do reassembly and to
+ * throw an exception if there's no
+ * line ending in the current packet
+ * and we're not doing reassembly.
+ */
+ break;
+ }
if (linelen != 0)
{