diff options
author | guy <guy@f5534014-38df-0310-8fa8-9805f1628bb7> | 2005-10-24 02:35:43 +0000 |
---|---|---|
committer | guy <guy@f5534014-38df-0310-8fa8-9805f1628bb7> | 2005-10-24 02:35:43 +0000 |
commit | 3744d5b27cb0698fa491f4c1f5bf123c753db832 (patch) | |
tree | 635a58a5ff773631badd78407e7a9b148f377cfa /epan/dissectors/packet-irc.c | |
parent | ad1d5d5ca5c6b2478d6af0e74cda9367f7280e8c (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.)
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@16290 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/dissectors/packet-irc.c')
-rw-r--r-- | epan/dissectors/packet-irc.c | 11 |
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) { |