]> git.ipfire.org Git - thirdparty/tor.git/commit
Fix buffer over-reads in the rendcache tests
authorcypherpunks <cypherpunks@torproject.org>
Wed, 11 Nov 2015 13:47:35 +0000 (14:47 +0100)
committerNick Mathewson <nickm@torproject.org>
Wed, 9 Dec 2015 15:22:26 +0000 (10:22 -0500)
commitc94aa4573ab571af233e83f539844f3ccdd9fc2b
tree5a665be6981f091b409de3a06b7a366f0cd48c8e
parent3d0d2a511c13d6d24be73c8651374c4d7db99379
Fix buffer over-reads in the rendcache tests

The hidden service descriptor cache (rendcache) tests use digest maps
which expect keys to have a length of DIGEST_LEN.

Because the tests use key strings with a length lower than DIGEST_LEN,
the internal copy operation reads outside the key strings which leads to
buffer over-reads.

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

Patch on ade5005853c17b3ae5923c194680442e0f86db4d.
src/test/test_rendcache.c