diff options
author | guy <guy@f5534014-38df-0310-8fa8-9805f1628bb7> | 2003-12-23 21:22:00 +0000 |
---|---|---|
committer | guy <guy@f5534014-38df-0310-8fa8-9805f1628bb7> | 2003-12-23 21:22:00 +0000 |
commit | 11684eda3d2ff8e1064c8254db7d1310ffe6ddad (patch) | |
tree | 2766be43df63431fc4fe45f4591cd8a8b16f57fd /packet-beep.c | |
parent | 30933163f19d1fab4012dafa92e5cba4425a4847 (diff) |
Have "tvb_ensure_length_remaining()" throw the appropriate exception if
there's no data remaining - its callers largely depend on it doing so.
That means that the BEEP dissector doesn't have to check for it
returning 0.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@9433 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'packet-beep.c')
-rw-r--r-- | packet-beep.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/packet-beep.c b/packet-beep.c index ece630ccde..8be72383fd 100644 --- a/packet-beep.c +++ b/packet-beep.c @@ -1,7 +1,7 @@ /* packet-beep.c * Routines for BEEP packet disassembly * - * $Id: packet-beep.c,v 1.13 2003/07/25 04:17:36 gram Exp $ + * $Id: packet-beep.c,v 1.14 2003/12/23 21:18:57 guy Exp $ * * Copyright (c) 2000 by Richard Sharpe <rsharpe@ns.aus.com> * Modified 2001 Darren New <dnew@invisible.net> for BEEP. @@ -389,9 +389,6 @@ static int header_len(tvbuff_t *tvb, int offset) while (1) { - if (tvb_ensure_length_remaining(tvb, offset + i) < 1) - return i; /* Not enough characters left ... */ - if ((sc = tvb_get_guint8(tvb, offset + i)) == 0x0d && tvb_get_guint8(tvb, offset + i + 1) == 0x0a) return i; /* Done here ... */ |