mirror of
https://github.com/transmission/transmission
synced 2024-12-26 09:37:56 +00:00
Ensure buffer contents are null-terminated
Data added with `evbuffer_add` isn't null-terminated. This was causing extra characters to appear at the end of the output. Fixes: #174
This commit is contained in:
parent
7669c97e12
commit
663c4532f0
1 changed files with 1 additions and 0 deletions
|
@ -2108,6 +2108,7 @@ static int flush(char const* rpcurl, tr_variant** benc)
|
|||
break;
|
||||
|
||||
default:
|
||||
evbuffer_add(buf, "", 1);
|
||||
fprintf(stderr, "Unexpected response: %s\n", evbuffer_pullup(buf, -1));
|
||||
status |= EXIT_FAILURE;
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue