aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-dcerpc.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2017-09-24 13:01:49 -0700
committerGuy Harris <guy@alum.mit.edu>2017-09-24 20:02:20 +0000
commit7517b73e74bd3a425406e08fa0ce667a655ee049 (patch)
treec224c0999c035ce50b98363da5e373b7dbb3ec0c /epan/dissectors/packet-dcerpc.c
parenta9963c45e79440094df221dfcb34b11ba94f0882 (diff)
Replace DISSECTOR_ASSERT(hfinfo->type == FT_STRING) with DISSECTOR_ASSERT_FIELD_TYPE.
That produces better error messages, giving the name of the offending field. Change-Id: I155ac29c68ecd7811cc9752980db9cdc37fea72e Reviewed-on: https://code.wireshark.org/review/23685 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'epan/dissectors/packet-dcerpc.c')
-rw-r--r--epan/dissectors/packet-dcerpc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/epan/dissectors/packet-dcerpc.c b/epan/dissectors/packet-dcerpc.c
index a3f700d527..4d715dae99 100644
--- a/epan/dissectors/packet-dcerpc.c
+++ b/epan/dissectors/packet-dcerpc.c
@@ -2599,7 +2599,7 @@ dissect_ndr_cvstring(tvbuff_t *tvb, int offset, packet_info *pinfo,
/* Make sure this really is a string field. */
hfinfo = proto_registrar_get_nth(hfindex);
- DISSECTOR_ASSERT(hfinfo->type == FT_STRING);
+ DISSECTOR_ASSERT_FIELD_TYPE(hfinfo, FT_STRING);
if (di->conformant_run) {
/* just a run to handle conformant arrays, no scalars to dissect */
@@ -2784,7 +2784,7 @@ dissect_ndr_vstring(tvbuff_t *tvb, int offset, packet_info *pinfo,
/* Make sure this really is a string field. */
hfinfo = proto_registrar_get_nth(hfindex);
- DISSECTOR_ASSERT(hfinfo->type == FT_STRING);
+ DISSECTOR_ASSERT_FIELD_TYPE(hfinfo, FT_STRING);
if (di->conformant_run) {
/* just a run to handle conformant arrays, no scalars to dissect */