Text   |  XML   |  ReML   |   Visible Warnings:

Integer Overflow of Allocation Size  at lemon.c:4359

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

Strsafe_insert

(/home/sate/Testcases/c/cve/wireshark-1.2.0/tools/lemon/lemon.c)expand/collapse
Show more  
 4334  int Strsafe_insert(char *data)
 4335  {
 4336    x1node *np;
 4337    int h;
 4338    int ph;
 4339   
 4340    if( x1a==0 ) return 0;
 4341    ph = strhash(data);
 4342    h = ph & (x1a->size-1);
 4343    np = x1a->ht[h];
 4344    while( np ){
 4345      if( strcmp(np->data,data)==0 ){
 4346        /* An existing entry with the same key is found. */
 4347        /* Fail because overwrite is not allows. */
 4348        return 0;
 4349      }
 4350      np = np->next;
 4351    }
 4352    if( x1a->count>=x1a->size ){
 4353      /* Need to make the hash table bigger */
 4354      int i,size;
 4355      struct s_x1 array;
 4356      array.size = size = x1a->size*2;
 4357      array.count = x1a->count;
 4358      array.tbl = (x1node*)malloc(
 4359        (sizeof(x1node) + sizeof(x1node*))*size );
Show more  




Change Warning 889.29738 : Integer Overflow of Allocation Size

Priority:
State:
Finding:
Owner:
Note: