CInema: Fix glob anchoring
Vicki Pfau vi@endrift.com
Wed, 17 Mar 2021 18:11:45 -0700
1 files changed,
1 insertions(+),
1 deletions(-)
jump to
M
src/platform/test/cinema-main.c
→
src/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)) {