diff options
author | Alexis La Goutte <alexis.lagoutte@gmail.com> | 2014-02-21 21:57:03 +0100 |
---|---|---|
committer | Alexis La Goutte <alexis.lagoutte@gmail.com> | 2014-02-22 16:43:50 +0000 |
commit | 88c34ec6c817d4175643408dcb5e537b5f068602 (patch) | |
tree | abb1f319dd788dedc4acba668cafe87ea5a94df3 /epan/dissectors/packet-h248.c | |
parent | cfeae2f86c2f4b3dda9c9a73cedcbc04664c8a2a (diff) |
Fix Called function pointer is null (null dereference) found by Clang
../../asn1/h248/packet-h248-template.c:1222:31: warning: Value stored to 'prop' is never read
if (!prop->dissector) prop = &no_param;
Change-Id: I6d380fbb5fef9dc548385b0b470aea1cb3c34df1
Reviewed-on: https://code.wireshark.org/review/301
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-h248.c')
-rw-r--r-- | epan/dissectors/packet-h248.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/epan/dissectors/packet-h248.c b/epan/dissectors/packet-h248.c index 7cf2d957ae..f4aedce90c 100644 --- a/epan/dissectors/packet-h248.c +++ b/epan/dissectors/packet-h248.c @@ -1693,9 +1693,8 @@ static int dissect_h248_PropertyID(gboolean implicit_tag _U_, tvbuff_t *tvb, int } else { prop = &no_param; } - if (prop && prop->hfid ) { - if (!prop->dissector) prop = &no_param; - prop->dissector(tree, next_tvb, actx->pinfo, *(prop->hfid), &curr_info, prop->data); + if (prop && prop->hfid && prop->dissector) { + prop->dissector(tree, next_tvb, actx->pinfo, *(prop->hfid), &curr_info, prop->data); } return end_offset; @@ -5369,7 +5368,7 @@ dissect_h248_ValueV1(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U /*--- End of included file: packet-h248-fn.c ---*/ -#line 1413 "../../asn1/h248/packet-h248-template.c" +#line 1412 "../../asn1/h248/packet-h248-template.c" static void dissect_h248_tpkt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { dissect_tpkt_encap(tvb, pinfo, tree, h248_desegment, h248_handle); @@ -6791,7 +6790,7 @@ void proto_register_h248(void) { NULL, HFILL }}, /*--- End of included file: packet-h248-hfarr.c ---*/ -#line 1578 "../../asn1/h248/packet-h248-template.c" +#line 1577 "../../asn1/h248/packet-h248-template.c" GCP_HF_ARR_ELEMS("h248",h248_arrel) @@ -6957,7 +6956,7 @@ void proto_register_h248(void) { &ett_h248_SigParameterV1, /*--- End of included file: packet-h248-ettarr.c ---*/ -#line 1596 "../../asn1/h248/packet-h248-template.c" +#line 1595 "../../asn1/h248/packet-h248-template.c" }; static ei_register_info ei[] = { |