mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-14 07:03:44 +01:00
Never use sprintf. tor_snprintf instead. Bug in tests, not in any released tor.
This commit is contained in:
parent
a17537a238
commit
9dff41694a
@ -255,7 +255,7 @@ test_dir_handle_get_bytes_txt(void *data)
|
|||||||
tt_assert(strstr(header, "Content-Encoding: identity\r\n"));
|
tt_assert(strstr(header, "Content-Encoding: identity\r\n"));
|
||||||
tt_assert(strstr(header, "Pragma: no-cache\r\n"));
|
tt_assert(strstr(header, "Pragma: no-cache\r\n"));
|
||||||
|
|
||||||
sprintf(buff, "Content-Length: %ld\r\n", (long) body_len);
|
tor_snprintf(buff, sizeof(buff), "Content-Length: %ld\r\n", (long) body_len);
|
||||||
tt_assert(strstr(header, buff));
|
tt_assert(strstr(header, buff));
|
||||||
|
|
||||||
tt_int_op(body_used, OP_EQ, strlen(body));
|
tt_int_op(body_used, OP_EQ, strlen(body));
|
||||||
|
Loading…
Reference in New Issue
Block a user