Skip to content
Snippets Groups Projects
Commit 9dff4169 authored by Nick Mathewson's avatar Nick Mathewson :game_die:
Browse files

Never use sprintf. tor_snprintf instead. Bug in tests, not in any released tor.

parent a17537a2
No related branches found
No related tags found
No related merge requests found
......@@ -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, "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_int_op(body_used, OP_EQ, strlen(body));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment