diff options
author | Nick Mathewson <nickm@torproject.org> | 2014-04-09 09:20:25 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2014-04-09 09:20:25 -0400 |
commit | 2f73525883373df17a7e11a8feae28f7558fe62e (patch) | |
tree | 50183a9921a70699fbc8dd0acbc0805c58ca35d6 /src/test/test_circuitlist.c | |
parent | fa6b80d6e510dd7027cc2dab50622bad4dc90064 (diff) | |
download | tor-2f73525883373df17a7e11a8feae28f7558fe62e.tar.gz tor-2f73525883373df17a7e11a8feae28f7558fe62e.zip |
Fix a dumb C bug in the unit tests for 9841
Fixes bug 11460; bug only affects unit tests and is not in any
released version of Tor.
Diffstat (limited to 'src/test/test_circuitlist.c')
-rw-r--r-- | src/test/test_circuitlist.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/test/test_circuitlist.c b/src/test/test_circuitlist.c index 54c0c03ca3..53cd41591f 100644 --- a/src/test/test_circuitlist.c +++ b/src/test/test_circuitlist.c @@ -177,7 +177,10 @@ test_rend_token_maps(void *arg) c3 = or_circuit_new(0, NULL); c4 = or_circuit_new(0, NULL); - tt_int_op(strlen((char*)tok1), ==, REND_TOKEN_LEN); + /* Make sure we really filled up the tok* variables */ + tt_int_op(tok1[REND_TOKEN_LEN-1], ==, 'y'); + tt_int_op(tok2[REND_TOKEN_LEN-1], ==, ' '); + tt_int_op(tok3[REND_TOKEN_LEN-1], ==, '.'); /* No maps; nothing there. */ tt_ptr_op(NULL, ==, circuit_get_rendezvous(tok1)); |