Text   |  XML   |  ReML   |   Visible Warnings:

Integer Overflow of Allocation Size  at lemon.c:4721

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

State_insert

(/home/sate/Testcases/c/cve/wireshark-1.2.0/tools/lemon/lemon.c)expand/collapse
Show more  
 4696  int State_insert(struct state *data, struct config *key)
 4697  {
 4698    x3node *np;
 4699    int h;
 4700    int ph;
 4701   
 4702    if( x3a==0 ) return 0;
 4703    ph = statehash(key);
 4704    h = ph & (x3a->size-1);
 4705    np = x3a->ht[h];
 4706    while( np ){
 4707      if( statecmp(np->key,key)==0 ){
 4708        /* An existing entry with the same key is found. */
 4709        /* Fail because overwrite is not allows. */
 4710        return 0;
 4711      }
 4712      np = np->next;
 4713    }
 4714    if( x3a->count>=x3a->size ){
 4715      /* Need to make the hash table bigger */
 4716      int i,size;
 4717      struct s_x3 array;
 4718      array.size = size = x3a->size*2;
 4719      array.count = x3a->count;
 4720      array.tbl = (x3node*)malloc(
 4721        (sizeof(x3node) + sizeof(x3node*))*size );
Show more  




Change Warning 879.29751 : Integer Overflow of Allocation Size

Priority:
State:
Finding:
Owner:
Note: