aboutsummaryrefslogtreecommitdiff
path: root/src/test/test_dir_handle_get.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2016-03-22 08:52:17 -0400
committerNick Mathewson <nickm@torproject.org>2016-03-22 08:52:17 -0400
commit9dff41694a9706f91ac175ebb7a3e23566dad189 (patch)
treedae48b9010780bc570dfe161f8ac5609248ede4a /src/test/test_dir_handle_get.c
parenta17537a2386a98cba39c94dfb8b09b50edf16922 (diff)
downloadtor-9dff41694a9706f91ac175ebb7a3e23566dad189.tar.gz
tor-9dff41694a9706f91ac175ebb7a3e23566dad189.zip
Never use sprintf. tor_snprintf instead. Bug in tests, not in any released tor.
Diffstat (limited to 'src/test/test_dir_handle_get.c')
-rw-r--r--src/test/test_dir_handle_get.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/test/test_dir_handle_get.c b/src/test/test_dir_handle_get.c
index d74aeb6110..05657ca452 100644
--- a/src/test/test_dir_handle_get.c
+++ b/src/test/test_dir_handle_get.c
@@ -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));