tor/src/test
Nick Mathewson d8cfa2ef4e Avoid free()ing from an mmap on corrupted microdesc cache
The 'body' field of a microdesc_t holds a strdup()'d value if the
microdesc's saved_location field is SAVED_IN_JOURNAL or
SAVED_NOWHERE, and holds a pointer to the middle of an mmap if the
microdesc is SAVED_IN_CACHE.  But we weren't setting that field
until a while after we parsed the microdescriptor, which left an
interval where microdesc_free() would try to free() the middle of
the mmap().

This patch also includes a regression test.

This is a fix for #10409; bugfix on 0.2.2.6-alpha.
2013-12-16 13:06:00 -05:00
..
bench.c Update copyright dates to 2012; add a few missing copyright statements 2012-06-04 20:58:17 -04:00
Makefile.am Tweak the haiku-support patches 2011-12-19 11:27:08 -05:00
Makefile.nmake Fix some remaining nmake/msvc build issues 2012-05-16 10:08:24 -04:00
test-child.c Update copyright dates to 2012; add a few missing copyright statements 2012-06-04 20:58:17 -04:00
test.c Don't run off the end of the array-of-freelists 2013-05-09 13:10:48 -04:00
test.h Update copyright dates to 2012; add a few missing copyright statements 2012-06-04 20:58:17 -04:00
test_addr.c Add unit test for tor_addr_is_loopback 2013-03-01 12:40:41 -05:00
test_config.c Merge remote-tracking branch 'public/bug3940_redux' 2012-06-13 11:40:38 -04:00
test_containers.c Make unit test for bug7191 work with new smartlist_new() name 2012-10-23 21:49:46 -04:00
test_crypto.c Update copyright dates to 2012; add a few missing copyright statements 2012-06-04 20:58:17 -04:00
test_data.c Update copyright dates to 2012; add a few missing copyright statements 2012-06-04 20:58:17 -04:00
test_dir.c Update copyright dates to 2012; add a few missing copyright statements 2012-06-04 20:58:17 -04:00
test_microdesc.c Avoid free()ing from an mmap on corrupted microdesc cache 2013-12-16 13:06:00 -05:00
test_pt.c Update copyright dates to 2012; add a few missing copyright statements 2012-06-04 20:58:17 -04:00
test_util.c Fix unit test for format_helper_exit_status 2013-10-10 11:15:35 -04:00
tinytest.c Synchronize with upstream tinytest again: remove _identifiers 2012-02-13 17:45:15 -05:00
tinytest.h Synchronize with upstream tinytest again: remove _identifiers 2012-02-13 17:45:15 -05:00
tinytest_demo.c Synchronize with upstream tinytest. 2012-02-13 17:29:31 -05:00
tinytest_macros.h Oops; there were a couple of typos in the upstream tinytest 2012-02-13 17:48:43 -05:00