aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-diameter.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-diameter.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-diameter.c')
-rw-r--r--epan/dissectors/packet-diameter.c18
1 files changed, 6 insertions, 12 deletions
diff --git a/epan/dissectors/packet-diameter.c b/epan/dissectors/packet-diameter.c
index 2442d4835f..3e83d1f3d5 100644
--- a/epan/dissectors/packet-diameter.c
+++ b/epan/dissectors/packet-diameter.c
@@ -628,8 +628,7 @@ integer32_avp(diam_ctx_t* c, diam_avp_t* a, tvbuff_t* tvb)
}
else {
pi = proto_tree_add_bytes_format(c->tree, hf_diameter_avp_data_wrong_length,
- tvb, 0, length,
- tvb_get_ptr(tvb, 0, length),
+ tvb, 0, length, NULL,
"Error! Bad Integer32 Length");
expert_add_info_format(c->pinfo, pi, PI_MALFORMED, PI_NOTE,
"Bad Integer32 Length (%u)", length);
@@ -655,8 +654,7 @@ integer64_avp(diam_ctx_t* c, diam_avp_t* a, tvbuff_t* tvb)
}
else {
pi = proto_tree_add_bytes_format(c->tree, hf_diameter_avp_data_wrong_length,
- tvb, 0, length,
- tvb_get_ptr(tvb, 0, length),
+ tvb, 0, length, NULL,
"Error! Bad Integer64 Length");
expert_add_info_format(c->pinfo, pi, PI_MALFORMED, PI_NOTE,
"Bad Integer64 Length (%u)", length);
@@ -682,8 +680,7 @@ unsigned32_avp(diam_ctx_t* c, diam_avp_t* a, tvbuff_t* tvb)
}
else {
pi = proto_tree_add_bytes_format(c->tree, hf_diameter_avp_data_wrong_length,
- tvb, 0, length,
- tvb_get_ptr(tvb, 0, length),
+ tvb, 0, length, NULL,
"Error! Bad Unsigned32 Length");
expert_add_info_format(c->pinfo, pi, PI_MALFORMED, PI_NOTE,
"Bad Unsigned32 Length (%u)", length);
@@ -709,8 +706,7 @@ unsigned64_avp(diam_ctx_t* c, diam_avp_t* a, tvbuff_t* tvb)
}
else {
pi = proto_tree_add_bytes_format(c->tree, hf_diameter_avp_data_wrong_length,
- tvb, 0, length,
- tvb_get_ptr(tvb, 0, length),
+ tvb, 0, length, NULL,
"Error! Bad Unsigned64 Length");
expert_add_info_format(c->pinfo, pi, PI_MALFORMED, PI_NOTE,
"Bad Unsigned64 Length (%u)", length);
@@ -736,8 +732,7 @@ float32_avp(diam_ctx_t* c, diam_avp_t* a, tvbuff_t* tvb)
}
else {
pi = proto_tree_add_bytes_format(c->tree, hf_diameter_avp_data_wrong_length,
- tvb, 0, length,
- tvb_get_ptr(tvb, 0, length),
+ tvb, 0, length, NULL,
"Error! Bad Float32 Length");
expert_add_info_format(c->pinfo, pi, PI_MALFORMED, PI_NOTE,
"Bad Float32 Length (%u)", length);
@@ -763,8 +758,7 @@ float64_avp(diam_ctx_t* c, diam_avp_t* a, tvbuff_t* tvb)
}
else {
pi = proto_tree_add_bytes_format(c->tree, hf_diameter_avp_data_wrong_length,
- tvb, 0, length,
- tvb_get_ptr(tvb, 0, length),
+ tvb, 0, length, NULL,
"Error! Bad Float64 Length");
expert_add_info_format(c->pinfo, pi, PI_MALFORMED, PI_NOTE,
"Bad Float64 Length (%u)", length);