aboutsummaryrefslogtreecommitdiffstats
path: root/packet-tr.c
diff options
context:
space:
mode:
authorGilbert Ramirez <gram@alumni.rice.edu>1999-09-09 04:47:17 +0000
committerGilbert Ramirez <gram@alumni.rice.edu>1999-09-09 04:47:17 +0000
commitca61d69c63d7637e42920530803e82bbe93b8bb4 (patch)
tree9312a6c591b25dfed03887ff75b3df8f3b3ff5a1 /packet-tr.c
parentd32b5f829fac401b28f4810a3aa4350d9577efdb (diff)
Removed two cases where protocol decoding assumed that the data in the
packets were correct. Bad packets could cause segfaults. svn path=/trunk/; revision=641
Diffstat (limited to 'packet-tr.c')
-rw-r--r--packet-tr.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/packet-tr.c b/packet-tr.c
index fa7023f763..1f87c82bbd 100644
--- a/packet-tr.c
+++ b/packet-tr.c
@@ -2,7 +2,7 @@
* Routines for Token-Ring packet disassembly
* Gilbert Ramirez <gram@verdict.uthscsa.edu>
*
- * $Id: packet-tr.c,v 1.23 1999/08/27 19:27:11 gram Exp $
+ * $Id: packet-tr.c,v 1.24 1999/09/09 04:47:16 gram Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@unicom.net>
@@ -452,7 +452,10 @@ dissect_tr(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) {
/* if we have more than 2 bytes of RIF, then we have
ring/bridge pairs */
- if (trn_rif_bytes > 2) {
+ if (trn_rif_bytes > 18) {
+ proto_tree_add_text(tr_tree, offset + 14, 1,
+ "Illegal number of RIF bytes: %d", trn_rif_bytes);
+ } else if (trn_rif_bytes > 2) {
add_ring_bridge_pairs(trn_rif_bytes,
pd + offset, offset, tr_tree);
}