forked from osmocom/wireshark
snmp: add missing initializers in deep copies.
Change-Id: I0a9ef25fc79c47b329a3aed6e0de456ab905c971 Reviewed-on: https://code.wireshark.org/review/25901 Petri-Dish: Dario Lombardo <lomato@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Michael Mann <mmann78@netscape.net>
This commit is contained in:
parent
fa1635f5b0
commit
f7c8f0c8a5
|
@ -1476,12 +1476,16 @@ localize_ue( snmp_ue_assoc_t* o, const guint8* engine, guint engine_len )
|
|||
snmp_ue_assoc_t* n = (snmp_ue_assoc_t*)g_memdup(o,sizeof(snmp_ue_assoc_t));
|
||||
|
||||
n->user.userName.data = (guint8*)g_memdup(o->user.userName.data,o->user.userName.len);
|
||||
n->user.authModel = o->user.authModel;
|
||||
n->user.authPassword.data = (guint8*)g_memdup(o->user.authPassword.data,o->user.authPassword.len);
|
||||
n->user.authPassword.len = o->user.authPassword.len;
|
||||
n->user.privPassword.data = (guint8*)g_memdup(o->user.privPassword.data,o->user.privPassword.len);
|
||||
n->user.privPassword.len = o->user.privPassword.len;
|
||||
n->user.authKey.data = (guint8*)g_memdup(o->user.authKey.data,o->user.authKey.len);
|
||||
n->user.privKey.data = (guint8*)g_memdup(o->user.privKey.data,o->user.privKey.len);
|
||||
n->engine.data = (guint8*)g_memdup(engine,engine_len);
|
||||
n->engine.len = engine_len;
|
||||
n->priv_proto = o->priv_proto;
|
||||
|
||||
set_ue_keys(n);
|
||||
|
||||
|
@ -1504,8 +1508,8 @@ get_user_assoc(tvbuff_t* engine_tvb, tvbuff_t* user_tvb)
|
|||
static snmp_ue_assoc_t* a;
|
||||
guint given_username_len;
|
||||
guint8* given_username;
|
||||
guint given_engine_len;
|
||||
guint8* given_engine;
|
||||
guint given_engine_len = 0;
|
||||
guint8* given_engine = NULL;
|
||||
|
||||
if ( ! (localized_ues || unlocalized_ues ) ) return NULL;
|
||||
|
||||
|
|
|
@ -1578,12 +1578,16 @@ localize_ue( snmp_ue_assoc_t* o, const guint8* engine, guint engine_len )
|
|||
snmp_ue_assoc_t* n = (snmp_ue_assoc_t*)g_memdup(o,sizeof(snmp_ue_assoc_t));
|
||||
|
||||
n->user.userName.data = (guint8*)g_memdup(o->user.userName.data,o->user.userName.len);
|
||||
n->user.authModel = o->user.authModel;
|
||||
n->user.authPassword.data = (guint8*)g_memdup(o->user.authPassword.data,o->user.authPassword.len);
|
||||
n->user.authPassword.len = o->user.authPassword.len;
|
||||
n->user.privPassword.data = (guint8*)g_memdup(o->user.privPassword.data,o->user.privPassword.len);
|
||||
n->user.privPassword.len = o->user.privPassword.len;
|
||||
n->user.authKey.data = (guint8*)g_memdup(o->user.authKey.data,o->user.authKey.len);
|
||||
n->user.privKey.data = (guint8*)g_memdup(o->user.privKey.data,o->user.privKey.len);
|
||||
n->engine.data = (guint8*)g_memdup(engine,engine_len);
|
||||
n->engine.len = engine_len;
|
||||
n->priv_proto = o->priv_proto;
|
||||
|
||||
set_ue_keys(n);
|
||||
|
||||
|
@ -1606,8 +1610,8 @@ get_user_assoc(tvbuff_t* engine_tvb, tvbuff_t* user_tvb)
|
|||
static snmp_ue_assoc_t* a;
|
||||
guint given_username_len;
|
||||
guint8* given_username;
|
||||
guint given_engine_len;
|
||||
guint8* given_engine;
|
||||
guint given_engine_len = 0;
|
||||
guint8* given_engine = NULL;
|
||||
|
||||
if ( ! (localized_ues || unlocalized_ues ) ) return NULL;
|
||||
|
||||
|
@ -2996,7 +3000,7 @@ static int dissect_SMUX_PDUs_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, prot
|
|||
|
||||
|
||||
/*--- End of included file: packet-snmp-fn.c ---*/
|
||||
#line 1791 "./asn1/snmp/packet-snmp-template.c"
|
||||
#line 1795 "./asn1/snmp/packet-snmp-template.c"
|
||||
|
||||
|
||||
guint
|
||||
|
@ -3763,7 +3767,7 @@ void proto_register_snmp(void) {
|
|||
NULL, HFILL }},
|
||||
|
||||
/*--- End of included file: packet-snmp-hfarr.c ---*/
|
||||
#line 2293 "./asn1/snmp/packet-snmp-template.c"
|
||||
#line 2297 "./asn1/snmp/packet-snmp-template.c"
|
||||
};
|
||||
|
||||
/* List of subtrees */
|
||||
|
@ -3803,7 +3807,7 @@ void proto_register_snmp(void) {
|
|||
&ett_snmp_RReqPDU_U,
|
||||
|
||||
/*--- End of included file: packet-snmp-ettarr.c ---*/
|
||||
#line 2309 "./asn1/snmp/packet-snmp-template.c"
|
||||
#line 2313 "./asn1/snmp/packet-snmp-template.c"
|
||||
};
|
||||
static ei_register_info ei[] = {
|
||||
{ &ei_snmp_failed_decrypted_data_pdu, { "snmp.failed_decrypted_data_pdu", PI_MALFORMED, PI_WARN, "Failed to decrypt encryptedPDU", EXPFILL }},
|
||||
|
|
Loading…
Reference in New Issue