Text   |  XML   |  ReML   |   Visible Warnings:

Unreasonable Size Argument  at emem.c:692

No properties have been set. | edit properties
Jump to warning location ↓ warning details...
Show Events | Options

get_user_assoc

(/home/sate/Testcases/c/cve/wireshark-1.2.0/epan/dissectors/packet-snmp.c)expand/collapse
Show more  
 1189  static snmp_ue_assoc_t* get_user_assoc(tvbuff_t* engine_tvb, tvbuff_t* user_tvb) {
 1190          static snmp_ue_assoc_t* a;
 1191          guint given_username_len;
 1192          guint8* given_username;
 1193          guint given_engine_len;
 1194          guint8* given_engine;
 1195   
 1196          if ( ! (localized_ues || unlocalized_ues ) ) return NULL;
 1197   
 1198          if (! ( user_tvb && engine_tvb ) ) return NULL;
 1199   
 1200[+]         given_username_len = tvb_length_remaining(user_tvb,0);
 1201          given_username = ep_tvb_memdup(user_tvb,0,-1);
 1202[+]         given_engine_len = tvb_length_remaining(engine_tvb,0);
 1203          given_engine = ep_tvb_memdup(engine_tvb,0,-1);
 1204   
 1205          for (a = localized_ues; a; a = a->next) {
 1206                  if ( localized_match(a, given_username, given_username_len, given_engine, given_engine_len) ) {
 1207                          return a;
 1208                  }
 1209          }
 1210   
 1211          for (a = unlocalized_ues; a; a = a->next) {
 1212                  if ( unlocalized_match(a, given_username, given_username_len) ) {
 1213[+]                         snmp_ue_assoc_t* n = localize_ue( a, given_engine, given_engine_len );
expand/collapse

localize_ue

(/home/sate/Testcases/c/cve/wireshark-1.2.0/epan/dissectors/packet-snmp.c)expand/collapse
Show more  
 1168  static snmp_ue_assoc_t* localize_ue( snmp_ue_assoc_t* o, const guint8* engine, guint engine_len ) {
 1169          snmp_ue_assoc_t* n = se_memdup(o,sizeof(snmp_ue_assoc_t));
 1170   
 1171[+]         n->engine.data = se_memdup(engine,engine_len);
expand/collapse

se_memdup

(/home/sate/Testcases/c/cve/wireshark-1.2.0/epan/emem.c)expand/collapse
Show more  
 691  void* se_memdup(const void* src, size_t len) {
 692          return memcpy(se_alloc(len), src, len);
Show more  
Show more  
Show more  




Change Warning 1639.30850 : Unreasonable Size Argument

Priority:
State:
Finding:
Owner:
Note: