mirror of
https://github.com/ekeeke/Genesis-Plus-GX.git
synced 2025-01-14 12:19:06 +01:00
Fix buffer overflow - would probably be better to replace sprintf
everywhere with snprintf - note to ekeeke
This commit is contained in:
parent
a0b61cbeb1
commit
5b8048c2d1
@ -128,7 +128,7 @@ int load_archive(char *filename, unsigned char *buffer, int maxsize, char *exten
|
|||||||
/* Mega CD BIOS are required files */
|
/* Mega CD BIOS are required files */
|
||||||
if (!strcmp(filename,CD_BIOS_US) || !strcmp(filename,CD_BIOS_EU) || !strcmp(filename,CD_BIOS_JP))
|
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)
|
if (!fd)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user