mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-10 21:23:58 +01:00
test_routerkeys.c: Always check mkdir() return value
After this fix, we have no more unchecked mkdir() calls. Bug 29939; CID 144254. Bugfix on 0.2.7.2-alpha.
This commit is contained in:
parent
00ca3d04cf
commit
a7bc47532b
4
changes/bug29939
Normal file
4
changes/bug29939
Normal 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.
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user