Changeset 5720


Ignore:
Timestamp:
Apr 29, 2008, 2:51:02 AM (14 years ago)
Author:
charles
Message:

possible fix for #904: "crash on startup in tr_bitfieldHas"

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/fastresume.c

    r5658 r5720  
    586586        readBytes( &len, &buf, sizeof(len) );
    587587
    588         if( fieldsToLoad & internalIdToPublicBitfield( id ) ) switch( id )
     588        if( buf + len > end )
     589        {
     590            tr_torerr( tor, "Resume file seems to be corrupt.  Skipping." );
     591        }
     592        else if( fieldsToLoad & internalIdToPublicBitfield( id ) ) switch( id )
    589593        {
    590594            case FR_ID_DOWNLOADED:   ret |= parseDownloaded( tor, buf, len ); break;
Note: See TracChangeset for help on using the changeset viewer.