Commit Graph

7 Commits

Author SHA1 Message Date
cypherpunks
3d0d2a511c Fix buffer over-reads in the directory tests
The tests pass empty digest strings to the dir_server_new function which
copies it into a directory server structure. The copy operation expects
the digest strings to be DIGEST_LEN characters long.

Because the length of the empty digest strings are lower than
DIGEST_LEN, the copy operation reads outside the digest strings which
leads to buffer over-reads.

The issue is resolved by using character arrays with a size of
DIGEST_LEN.

Patch on 4ff08bb581.
2015-12-09 10:22:26 -05:00
Nick Mathewson
5431c60001 Fix whitespaces 2015-10-21 16:46:28 -04:00
Nick Mathewson
b7941cbfbb Fix numerous leaks and memory errors in tests. Found by valgrind 2015-10-21 08:49:29 -04:00
Nick Mathewson
d478704de8 Fix a number of unit-test memory leaks, found by valgrind. 2015-10-21 08:17:30 -04:00
Nick Mathewson
5d5d26ccee Fix a 32-bit error from jenkins 2015-10-02 15:39:08 +02:00
Nick Mathewson
92c436ccbc Fix warnings. 2015-10-02 15:12:04 +02:00
Reinaldo de Souza Jr
4ff08bb581 Add tests for directory_handle_command_get 2015-09-15 11:08:50 -05:00