mirror of
https://github.com/transmission/transmission
synced 2025-03-12 07:03:44 +00:00
fix tr_buildPath() crash
This commit is contained in:
parent
f7372aa0d1
commit
514f96418b
1 changed files with 4 additions and 1 deletions
|
@ -475,7 +475,10 @@ tr_buildPath ( char *buf, size_t buflen, const char *first_element, ... )
|
|||
evbuffer_add_printf( evbuf, "%s", element );
|
||||
element = (const char*) va_arg( vl, const char* );
|
||||
}
|
||||
strlcpy( buf, (char*)EVBUFFER_DATA(evbuf), buflen );
|
||||
if( EVBUFFER_LENGTH(evbuf) )
|
||||
strlcpy( buf, (char*)EVBUFFER_DATA(evbuf), buflen );
|
||||
else
|
||||
*buf = '\0';
|
||||
evbuffer_free( evbuf );
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue