Text   |  XML   |  ReML   |   Visible Warnings:

Integer Overflow of Allocation Size  at lemon.c:4523

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

Symbol_insert

(/home/sate/Testcases/c/cve/wireshark-1.2.0/tools/lemon/lemon.c)expand/collapse
Show more  
 4498  int Symbol_insert(struct symbol *data, char *key)
 4499  {
 4500    x2node *np;
 4501    int h;
 4502    int ph;
 4503   
 4504    if( x2a==0 ) return 0;
 4505    ph = strhash(key);
 4506    h = ph & (x2a->size-1);
 4507    np = x2a->ht[h];
 4508    while( np ){
 4509      if( strcmp(np->key,key)==0 ){
 4510        /* An existing entry with the same key is found. */
 4511        /* Fail because overwrite is not allows. */
 4512        return 0;
 4513      }
 4514      np = np->next;
 4515    }
 4516    if( x2a->count>=x2a->size ){
 4517      /* Need to make the hash table bigger */
 4518      int i,size;
 4519      struct s_x2 array;
 4520      array.size = size = x2a->size*2;
 4521      array.count = x2a->count;
 4522      array.tbl = (x2node*)malloc(
 4523        (sizeof(x2node) + sizeof(x2node*))*size );
Show more  




Change Warning 888.29748 : Integer Overflow of Allocation Size

Priority:
State:
Finding:
Owner:
Note: