mirror of
https://github.com/Cisco-Talos/clamav.git
synced 2026-05-03 21:22:53 -04:00
Coverity-344513: Fix use-after-free in unit test error condition.
This commit is contained in:
committed by
Micah Snyder
parent
e33797d11e
commit
a08377f9cf
@@ -2055,7 +2055,9 @@ int main(void)
|
||||
|
||||
srunner_set_log(sr, OBJDIR PATHSEP "test.log");
|
||||
if (freopen(OBJDIR PATHSEP "test-stderr.log", "w+", stderr) == NULL) {
|
||||
fputs("Unable to redirect stderr!\n", stderr);
|
||||
// The stderr FILE pointer may be closed by `freopen()` even if redirecting to the log file files.
|
||||
// So we will output the error message to stdout instead.
|
||||
fputs("Unable to redirect stderr!\n", stdout);
|
||||
}
|
||||
cl_debug();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user