Fix buffer overflow - would probably be better to replace sprintf

everywhere with snprintf - note to ekeeke
This commit is contained in:
twinaphex 2012-09-30 04:54:00 +02:00
parent a0b61cbeb1
commit 5b8048c2d1

View File

@ -128,7 +128,7 @@ int load_archive(char *filename, unsigned char *buffer, int maxsize, char *exten
/* Mega CD BIOS are required files */
if (!strcmp(filename,CD_BIOS_US) || !strcmp(filename,CD_BIOS_EU) || !strcmp(filename,CD_BIOS_JP))
{
sprintf(msg,"Unable to open CD BIOS: %s", filename);
snprintf(msg, sizeof(msg), "Unable to open CD BIOS: %s", filename);
}
if (!fd)