aboutsummaryrefslogtreecommitdiffstats
path: root/packet-isis-clv.c
diff options
context:
space:
mode:
authorLaurent Deniel <laurent.deniel@free.fr>2000-08-10 14:21:09 +0000
committerLaurent Deniel <laurent.deniel@free.fr>2000-08-10 14:21:09 +0000
commitc1f7e92131c27d81e03ce7aac95d6418320998f1 (patch)
treeb3f346e26facb0492050bfca46944a20ee3084c3 /packet-isis-clv.c
parenteeb4ab5276a4b947178e9def1206eac5fc683217 (diff)
Fix decoding of short ISIS CLV data frames.
But there is still a problem with the isis_dissect_unknown procedure which calls proto_tree_add_text: the va_list arguments are incorrectly decoded in proto.c. I suspect a problem with inclusion of stdarg.h vs. varargs.h but for now, I can't figure out where ... (problem on Linux intel with gcc 2.91.66). svn path=/trunk/; revision=2244
Diffstat (limited to 'packet-isis-clv.c')
-rw-r--r--packet-isis-clv.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/packet-isis-clv.c b/packet-isis-clv.c
index a7b4b50161..6d0788bc6d 100644
--- a/packet-isis-clv.c
+++ b/packet-isis-clv.c
@@ -1,7 +1,7 @@
/* packet-isis-clv.c
* Common CLV decode routines.
*
- * $Id: packet-isis-clv.c,v 1.6 2000/06/19 08:33:47 guy Exp $
+ * $Id: packet-isis-clv.c,v 1.7 2000/08/10 14:21:09 deniel Exp $
* Stuart Stanley <stuarts@mxmail.net>
*
* Ethereal - Network traffic analyzer
@@ -304,7 +304,7 @@ isis_dissect_clvs(const isis_clv_handle_t *opts, int len, int id_length,
length = pd[offset++];
adj = (sizeof(code) + sizeof(length) + length);
len -= adj;
- if ( len < 0 ) {
+ if ( len < 0 || !BYTES_ARE_IN_FRAME(offset, length) ) {
isis_dissect_unknown(offset, adj, tree, fd,
"Short CLV header (%d vs %d)",
adj, len + adj );