all repos — mgba @ 1c0aa6c358d6163563a192ce375869586646cbd0

mGBA Game Boy Advance Emulator

Test: Fix crash if directory doesn't resolve
Vicki Pfau vi@endrift.com
Tue, 21 Jul 2020 01:09:48 -0700
commit

1c0aa6c358d6163563a192ce375869586646cbd0

parent

14e8b1230794f9b0018e990e2802954502a928e1

1 files changed, 4 insertions(+), 2 deletions(-)

jump to
M src/platform/test/cinema-main.csrc/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;