all repos — mgba @ f853de37b9969afc7ccd145f6e7f06cf9e76a3eb

mGBA Game Boy Advance Emulator

CInema: Fix glob anchoring
Vicki Pfau vi@endrift.com
Wed, 17 Mar 2021 18:11:45 -0700
commit

f853de37b9969afc7ccd145f6e7f06cf9e76a3eb

parent

2e6f8b4af99f9598c5f958b9d036cd4937c08898

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

jump to
M src/platform/test/cinema-main.csrc/platform/test/cinema-main.c

@@ -415,7 +415,7 @@ return collectTests(tests, path);

} else if (next[0] == '.') { char subtest[MAX_TEST]; if (!ancestors) { - strncpy(subtest, glob, next - glob); + strlcpy(subtest, glob, next - glob + 1); } else { size_t len = strlen(ancestors) + (next - glob) + 2; if (len > sizeof(subtest)) {