Changeset 1495


Ignore:
Timestamp:
2014-05-30T16:51:13+02:00 (4 months ago)
Author:
moo
Message:

invalid read of 2 bytes in hashtable

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/mod_disassembler/xc_disassembler.c

    r1488 r1495  
    4949            buf = erealloc(buf, bufsize); 
    5050        } 
    51         memcpy(buf, BUCKET_KEY_S(b), keysize); 
     51        memcpy(buf, BUCKET_KEY_S(b), keysize - 2); 
    5252        buf[keysize - 2] = buf[keysize - 1] = ""[0]; 
    5353        keyLength = b->nKeyLength; 
     
    8585            buf = erealloc(buf, bufsize); 
    8686        } 
    87         memcpy(buf, BUCKET_KEY_S(b), keysize); 
     87        memcpy(buf, BUCKET_KEY_S(b), keysize - 2); 
    8888        buf[keysize - 2] = buf[keysize - 1] = ""[0]; 
    8989        keyLength = b->nKeyLength; 
  • trunk/processor/hashtable.m4

    r1494 r1495  
    2525                buf = erealloc(buf, bufsize); 
    2626            } 
    27             memcpy(buf, BUCKET_KEY_S(srcBucket), keysize); 
     27            memcpy(buf, BUCKET_KEY_S(srcBucket), keysize - 2); 
    2828            buf[keysize - 2] = buf[keysize - 1] = ""[0]; 
    2929            keysize = srcBucket->nKeyLength; 
Note: See TracChangeset for help on using the changeset viewer.