summaryrefslogtreecommitdiff
path: root/packet-afs.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2003-12-27 03:45:45 +0000
committerGuy Harris <guy@alum.mit.edu>2003-12-27 03:45:45 +0000
commit46ce3ac2fae85ea0d809ce10ba029fa82a4ae1fe (patch)
tree15fb003e941ada12a5f774f8bbed58f48a542ddc /packet-afs.c
parent83887ebd3a604a24077d47b1f67e8ce45228b5ac (diff)
downloadwireshark-46ce3ac2fae85ea0d809ce10ba029fa82a4ae1fe.tar.gz
There might not be any AFS payload in an AFS reply; for fields in the
reply that don't come from the packet, use an offset and length of 0, so that we don't throw an exception if the purported data at that offset with that length doesn't exist. svn path=/trunk/; revision=9453
Diffstat (limited to 'packet-afs.c')
-rw-r--r--packet-afs.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/packet-afs.c b/packet-afs.c
index b1b2e823b4..9972edbc83 100644
--- a/packet-afs.c
+++ b/packet-afs.c
@@ -8,7 +8,7 @@
* Portions based on information/specs retrieved from the OpenAFS sources at
* www.openafs.org, Copyright IBM.
*
- * $Id: packet-afs.c,v 1.54 2003/03/05 09:52:22 sahlberg Exp $
+ * $Id: packet-afs.c,v 1.55 2003/12/27 03:45:45 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -368,8 +368,7 @@ dissect_afs(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
FALSE);
afs_tree = proto_item_add_subtree(ti, ett_afs);
- proto_tree_add_text(afs_tree, tvb,
- offset, -1,
+ proto_tree_add_text(afs_tree, tvb, 0, 0,
"Service: %s%s%s %s",
VALID_OPCODE(opcode) ? "" : "Encrypted ",
typenode == hf_afs_ubik ? "UBIK - " : "",
@@ -408,15 +407,15 @@ dissect_afs(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
node, tvb, offset, 4, opcode);
} else {
ti = proto_tree_add_uint(afs_tree,
- node, tvb, offset, 0, opcode);
+ node, tvb, 0, 0, opcode);
}
} else if ( reply && node != 0 ) {
/* the opcode isn't in this packet */
ti = proto_tree_add_uint(afs_tree,
- node, tvb, offset, 0, opcode);
+ node, tvb, 0, 0, opcode);
} else {
ti = proto_tree_add_text(afs_tree, tvb,
- offset, 0, "Operation: Unknown");
+ 0, 0, "Operation: Unknown");
}
/* Add the subtree for this particular service */