Test: Fix crash if directory doesn't resolve
Vicki Pfau vi@endrift.com
Tue, 21 Jul 2020 01:09:48 -0700
1 files changed,
4 insertions(+),
2 deletions(-)
jump to
M
src/platform/test/cinema-main.c
→
src/platform/test/cinema-main.c
@@ -767,8 +767,10 @@ goto cleanup;
} #ifndef _WIN32 char* rbase = realpath(base, NULL); - strncpy(base, rbase, PATH_MAX); - free(rbase); + if (rbase) { + strncpy(base, rbase, PATH_MAX); + free(rbase); + } #endif struct CInemaTestList tests;