Fix filename string bounds check in kzipopen()

git-svn-id: https://svn.eduke32.com/eduke32@7029 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
terminx 2018-10-07 05:22:27 +00:00
parent c67cdc00f8
commit c2f26439d1

View file

@ -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);
}