Merge remote-tracking branch 'tor-github/pr/864'

This commit is contained in:
teor 2019-04-02 11:46:42 +10:00
commit 583ed7c6ec
No known key found for this signature in database
GPG Key ID: 10FEAA0E7075672A
2 changed files with 8 additions and 4 deletions

4
changes/bug29939 Normal file
View File

@ -0,0 +1,4 @@
o Minor bugfixes (unit tests):
- In the "routerkeys/*" tests, check the return values of mkdir() for
possible failures. Fixes bug 29939; bugfix on 0.2.7.2-alpha. Found by
Coverity as CID 1444254.

View File

@ -455,11 +455,11 @@ test_routerkeys_ed_keys_init_all(void *arg)
options->TestingLinkKeySlop = 2*3600;
#ifdef _WIN32
mkdir(dir);
mkdir(keydir);
tt_int_op(0, OP_EQ, mkdir(dir));
tt_int_op(0, OP_EQ, mkdir(keydir));
#else
mkdir(dir, 0700);
mkdir(keydir, 0700);
tt_int_op(0, OP_EQ, mkdir(dir, 0700));
tt_int_op(0, OP_EQ, mkdir(keydir, 0700));
#endif /* defined(_WIN32) */
options->DataDirectory = dir;