IEEE 1609.2 dissector issue when HeaderInfo.generationLocation field is present

Bug: 16139
Change-Id: Ie5ad0025730257807b590f7ff9ac275ba27cce9e
Reviewed-on: https://code.wireshark.org/review/35266
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
This commit is contained in:
Yann Garcia 2019-11-30 20:14:29 -05:00 committed by Anders Broman
parent aa5105de63
commit 7554369a79
3 changed files with 6 additions and 5 deletions

View File

@ -94,8 +94,9 @@ EncryptedDataEncryptionKey/eciesBrainpoolP256r1 edekEciesBrainpoolP256r1
offset = dissect_oer_constrained_integer_64b_no_ub(tvb, offset, actx, tree, hf_index,
0U, NO_BOUND, &psid, FALSE);
if (my_private_data->unsecured_data) {
if ((my_private_data != NULL) && (my_private_data->unsecured_data != NULL)) {
/* Call next dissector here */
ieee1609dot2_set_next_default_psid(actx->pinfo, (guint32)psid);
dissector_try_uint(unsecured_data_subdissector_table, (guint32) psid, my_private_data->unsecured_data, actx->pinfo, tree);
my_private_data->unsecured_data = NULL;
}

View File

@ -2114,7 +2114,6 @@ dissect_secured_message(tvbuff_t *tvb, gint offset, packet_info *pinfo, proto_tr
static int
dissect_sgeonw(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree _U_, void *data _U_)
{
DISSECTOR_ASSERT(!p_get_proto_data(wmem_file_scope(), pinfo, proto_geonw, 0));
// Just store the tvbuff for later, as it is embedded inside a secured geonetworking packet
p_add_proto_data(wmem_file_scope(), pinfo, proto_geonw, 0, tvb);

View File

@ -1190,7 +1190,7 @@ dissect_ieee1609dot2_Psid(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U
static int
dissect_ieee1609dot2_T_psPsid(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 106 "./asn1/ieee1609dot2/ieee1609dot2.cnf"
#line 107 "./asn1/ieee1609dot2/ieee1609dot2.cnf"
offset = dissect_oer_constrained_integer_64b_no_ub(tvb, offset, actx, tree, hf_index,
0U, NO_BOUND, &((ieee1609_private_data_t*)actx->private_data)->psidssp, FALSE);
@ -1203,7 +1203,7 @@ dissect_ieee1609dot2_T_psPsid(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *act
static int
dissect_ieee1609dot2_T_opaque(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 110 "./asn1/ieee1609dot2/ieee1609dot2.cnf"
#line 111 "./asn1/ieee1609dot2/ieee1609dot2.cnf"
tvbuff_t *ssp;
ieee1609_private_data_t *my_private_data = (ieee1609_private_data_t*)actx->private_data;
@ -1500,8 +1500,9 @@ dissect_ieee1609dot2_T_hiPsid(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *act
offset = dissect_oer_constrained_integer_64b_no_ub(tvb, offset, actx, tree, hf_index,
0U, NO_BOUND, &psid, FALSE);
if (my_private_data->unsecured_data) {
if ((my_private_data != NULL) && (my_private_data->unsecured_data != NULL)) {
/* Call next dissector here */
ieee1609dot2_set_next_default_psid(actx->pinfo, (guint32)psid);
dissector_try_uint(unsecured_data_subdissector_table, (guint32) psid, my_private_data->unsecured_data, actx->pinfo, tree);
my_private_data->unsecured_data = NULL;
}