Fuzzing: initialize siphash key, don't init_logging twice.

This commit is contained in:
Nick Mathewson 2016-12-13 20:24:54 -05:00
parent 0666928c5c
commit ca657074b9
2 changed files with 7 additions and 1 deletions

3
.gitignore vendored
View File

@ -196,6 +196,9 @@ uptime-*.json
/src/test/test-timers.exe /src/test/test-timers.exe
/src/test/test_workqueue.exe /src/test/test_workqueue.exe
# /src/test/fuzz
/src/test/fuzz/fuzz-*
# /src/tools/ # /src/tools/
/src/tools/tor-checkkey /src/tools/tor-checkkey
/src/tools/tor-resolve /src/tools/tor-resolve

View File

@ -104,7 +104,10 @@ main(int argc, char **argv)
size_t size; size_t size;
tor_threads_init(); tor_threads_init();
init_logging(1); {
struct sipkey sipkey = { 1337, 7331 };
siphash_set_global_key(&sipkey);
}
/* Disable logging by default to speed up fuzzing. */ /* Disable logging by default to speed up fuzzing. */
int loglevel = LOG_ERR; int loglevel = LOG_ERR;