Changeset 2999


Ignore:
Timestamp:
Sep 9, 2007, 4:56:48 PM (15 years ago)
Author:
charles
Message:

(0.8x) fix loooong-standing off-by-one memory allocation bug in the bitfield code

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/0.8x/libtransmission/utils.c

    r2736 r2999  
    556556        return NULL;
    557557
    558     ret->len = ( bitcount + 7u ) / 8u;
     558    ret->len = bitcount/8u + 1;
    559559    ret->bits = calloc( ret->len, 1 );
    560560    if( NULL == ret->bits ) {
Note: See TracChangeset for help on using the changeset viewer.