aboutsummaryrefslogtreecommitdiffstats
path: root/packet-ncp2222.inc
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2002-10-10 03:25:47 +0000
committerGuy Harris <guy@alum.mit.edu>2002-10-10 03:25:47 +0000
commit9a4b466497b60044bbe8414f0750b085c4ee3138 (patch)
tree6d56fd15dd7a72df0f8b7559122a6ba42fa3b178 /packet-ncp2222.inc
parent445a6bb87c3917ad51788fc905a3fdb293d8310b (diff)
"#if 0" out the code in "get_string()", as it will probably cause
crashes on many platforms, and other random behavior on others. Don't create a temporary tree with an NCP tree underneath it if we already have an NCP tree; we don't want the results of a dissection to be stuck in an invisible temporary tree if we're supposed to be generating a protocol tree. svn path=/trunk/; revision=6399
Diffstat (limited to 'packet-ncp2222.inc')
-rw-r--r--packet-ncp2222.inc18
1 files changed, 15 insertions, 3 deletions
diff --git a/packet-ncp2222.inc b/packet-ncp2222.inc
index e614f6f610..6fa8acf74a 100644
--- a/packet-ncp2222.inc
+++ b/packet-ncp2222.inc
@@ -8,7 +8,7 @@
* Gilbert Ramirez <gram@alumni.rice.edu>
* Modified to decode NDS packets by Greg Morris <gmorris@novell.com>
*
- * $Id: packet-ncp2222.inc,v 1.24 2002/10/08 19:18:57 guy Exp $
+ * $Id: packet-ncp2222.inc,v 1.25 2002/10/10 03:25:47 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -1331,9 +1331,21 @@ align_4(tvbuff_t *tvb, guint32 aoffset)
return 0;
}
+/*
+ * XXX - this routine assumes that "dest_buf" points to a buffer large
+ * enough for the string we'll be generating; unfortunately, it usually
+ * points to a null constant string, which is unlikely to be large
+ * enough for any characters whatsoever (so that this routine will
+ * overwrite some arbitrary stuff in memory), and may even be in
+ * a read-only portion of the address space (so that this routine
+ * will crash).
+ *
+ * We "#if 0" it out for now, to eliminate crashes.
+ */
static void
get_string(tvbuff_t* tvb, guint offset, guint str_length, char *dest_buf)
{
+#if 0
guint32 i;
guint16 c_char;
guint32 length_remaining = 0;
@@ -1375,6 +1387,7 @@ get_string(tvbuff_t* tvb, guint offset, guint str_length, char *dest_buf)
}
dest_buf[i] = '\0';
return;
+#endif
}
/*************************************
@@ -7659,14 +7672,13 @@ dissect_nds_request(tvbuff_t *tvb, packet_info *pinfo,
* display filters can't possibly work. If we already have
* a proto_tree, then wonderful. If we don't, we need to build
* one. */
- if (ncp_rec) {
+ if (ncp_rec && !ncp_tree) {
proto_item *ti;
temp_tree = proto_tree_create_root();
proto_tree_set_visible(temp_tree, FALSE);
ti = proto_tree_add_item(temp_tree, proto_ncp, tvb, 0, -1, FALSE);
ncp_tree = proto_item_add_subtree(ti, ett_ncp);
-
}
}