From c2f26439d106f7443f6ec708c38cac9aa27ab6b2 Mon Sep 17 00:00:00 2001 From: terminx Date: Sun, 7 Oct 2018 05:22:27 +0000 Subject: [PATCH] Fix filename string bounds check in kzipopen() git-svn-id: https://svn.eduke32.com/eduke32@7029 1a8010ca-5511-0410-912e-c29ae57300e0 --- source/build/src/cache1d.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/build/src/cache1d.cpp b/source/build/src/cache1d.cpp index bb45bb0fa..b74a1b6b8 100644 --- a/source/build/src/cache1d.cpp +++ b/source/build/src/cache1d.cpp @@ -36,7 +36,7 @@ static intptr_t kzipopen(const char *filnam) char newst[BMAX_PATH+8]; newst[0] = '|'; - for (i=0; filnam[i] && (i < sizeof(newst)-2); i++) newst[i+1] = filnam[i]; + for (i=0; i < BMAX_PATH+4 && filnam[i]; i++) newst[i+1] = filnam[i]; newst[i+1] = 0; return kzopen(newst); }