aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-smb.c
diff options
context:
space:
mode:
authormorriss <morriss@f5534014-38df-0310-8fa8-9805f1628bb7>2011-02-10 16:31:00 +0000
committermorriss <morriss@f5534014-38df-0310-8fa8-9805f1628bb7>2011-02-10 16:31:00 +0000
commit1a64451c4d13c838dec0255cf7484225a7fbc500 (patch)
tree72d5f556239cdd05d77fbf05fdc389d22316d8e5 /epan/dissectors/packet-smb.c
parent9b508095f152fe9a7acf623da6d29627aff5829b (diff)
Modify proto_tree_add_bytes_format() and proto_tree_add_bytes_format_value()
so that if the start_ptr is NULL the bytes are extracted from the given TVB using the given offset and length. Replace a bunch of: proto_tree_add_bytes_format*(tree, hf, tvb, offset, length, tvb_get_ptr(tvb, offset, length), [...]) with: proto_tree_add_bytes_format*(tree, hf, tvb, offset, length, NULL, [...]) git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@35896 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/dissectors/packet-smb.c')
-rw-r--r--epan/dissectors/packet-smb.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/epan/dissectors/packet-smb.c b/epan/dissectors/packet-smb.c
index f0173a710a..d37cb9c89f 100644
--- a/epan/dissectors/packet-smb.c
+++ b/epan/dissectors/packet-smb.c
@@ -4128,7 +4128,7 @@ dissect_file_data(tvbuff_t *tvb, proto_tree *tree, int offset, guint16 bc, guint
}
tvblen = tvb_length_remaining(tvb, offset);
if(bc>tvblen){
- proto_tree_add_bytes_format(tree, hf_smb_file_data, tvb, offset, tvblen, tvb_get_ptr(tvb, offset, tvblen),"File Data: Incomplete. Only %d of %u bytes", tvblen, bc);
+ proto_tree_add_bytes_format(tree, hf_smb_file_data, tvb, offset, tvblen, NULL,"File Data: Incomplete. Only %d of %u bytes", tvblen, bc);
offset += tvblen;
} else {
proto_tree_add_item(tree, hf_smb_file_data, tvb, offset, bc, TRUE);
@@ -15158,8 +15158,7 @@ dissect_qfsi_vals(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree,
/* Finder Info ... */
CHECK_BYTE_COUNT_TRANS_SUBR(32);
proto_tree_add_bytes_format(tree, hf_smb_mac_fndrinfo, tvb,
- offset, 32,
- tvb_get_ptr(tvb, offset,32),
+ offset, 32, NULL,
"Finder Info: %s",
tvb_format_text(tvb, offset, 32));
COUNT_BYTES_TRANS_SUBR(32);