Changeset 4479


Ignore:
Timestamp:
Jan 4, 2008, 6:24:22 PM (15 years ago)
Author:
charles
Message:

fix tr_buildPath() crash

File:
1 edited

Legend:

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

    r4442 r4479  
    476476        element = (const char*) va_arg( vl, const char* );
    477477    }
    478     strlcpy( buf, (char*)EVBUFFER_DATA(evbuf), buflen );
     478    if( EVBUFFER_LENGTH(evbuf) )
     479        strlcpy( buf, (char*)EVBUFFER_DATA(evbuf), buflen );
     480    else
     481        *buf = '\0';
    479482    evbuffer_free( evbuf );
    480483}
Note: See TracChangeset for help on using the changeset viewer.