SAGA2: Prevent potential buffer overflow. CID 1457976

This commit is contained in:
Eugene Sandulenko 2021-07-14 23:43:44 +02:00
parent e4e572a798
commit 410192d10d
No known key found for this signature in database
GPG Key ID: 014D387312D34F08

View File

@ -43,7 +43,7 @@ static bool nameCheck(char name[], const char ext[]) {
void Saga2Engine::startVideo(const char *fileName, int x, int y) {
char file[260];
strcpy(file, "video/");
strncat(file, fileName, 260);
Common::strlcat(file, fileName, 260);
nameCheck(file, VIDEO_EXT);
if (!_smkDecoder)