aboutsummaryrefslogtreecommitdiffstats
path: root/packet-dcerpc-nt.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2002-03-09 22:46:29 +0000
committerGuy Harris <guy@alum.mit.edu>2002-03-09 22:46:29 +0000
commitf4ee24a894d32e8ff9c3c8d3508d73bb31322269 (patch)
treeaa19b81bf9ecb3934c30aed99e2014e34014485c /packet-dcerpc-nt.c
parent688ad377fe8fb07ddc6cb56109c9122405dbb460 (diff)
downloadwireshark-f4ee24a894d32e8ff9c3c8d3508d73bb31322269.tar.gz
wireshark-f4ee24a894d32e8ff9c3c8d3508d73bb31322269.tar.bz2
wireshark-f4ee24a894d32e8ff9c3c8d3508d73bb31322269.zip
Use -1, rather than 0, as the length when creating an item with a
subtree under it, so that if an exception is thrown while we're dissecting the items in the subtree, it runs to the end of the tvbuff (as, if an exception is thrown, it means the item should cover the stuff in the tvbuff *and* stuff beyond it). svn path=/trunk/; revision=4903
Diffstat (limited to 'packet-dcerpc-nt.c')
-rw-r--r--packet-dcerpc-nt.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/packet-dcerpc-nt.c b/packet-dcerpc-nt.c
index e25c8caf16..52dbdf40f8 100644
--- a/packet-dcerpc-nt.c
+++ b/packet-dcerpc-nt.c
@@ -2,7 +2,7 @@
* Routines for DCERPC over SMB packet disassembly
* Copyright 2001, Tim Potter <tpot@samba.org>
*
- * $Id: packet-dcerpc-nt.c,v 1.8 2002/03/06 10:01:17 sahlberg Exp $
+ * $Id: packet-dcerpc-nt.c,v 1.9 2002/03/09 22:46:29 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -562,7 +562,15 @@ dissect_ndr_nt_UNICODE_STRING(tvbuff_t *tvb, int offset,
}
if(parent_tree){
- item = proto_tree_add_text(parent_tree, tvb, offset, 0,
+ /*
+ * XXX - this means that if we throw an exception, this
+ * item might have an empty string as its tag.
+ *
+ * Some versions of GCC warn of a zero-length format
+ * string. I'm leaving that warning in, as a note that
+ * we need to handle this better.
+ */
+ item = proto_tree_add_text(parent_tree, tvb, offset, -1,
"");
tree = proto_item_add_subtree(item, ett_nt_unicode_string);
}