diff options
-rw-r--r-- | epan/dissectors/asn1/snmp/packet-snmp-template.c | 8 | ||||
-rw-r--r-- | epan/dissectors/packet-snmp.c | 14 |
2 files changed, 15 insertions, 7 deletions
diff --git a/epan/dissectors/asn1/snmp/packet-snmp-template.c b/epan/dissectors/asn1/snmp/packet-snmp-template.c index f1ffb5c9ff..7b92c3e006 100644 --- a/epan/dissectors/asn1/snmp/packet-snmp-template.c +++ b/epan/dissectors/asn1/snmp/packet-snmp-template.c @@ -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; diff --git a/epan/dissectors/packet-snmp.c b/epan/dissectors/packet-snmp.c index f0266f6c6e..18d67d3290 100644 --- a/epan/dissectors/packet-snmp.c +++ b/epan/dissectors/packet-snmp.c @@ -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 }}, |