From 5b8048c2d1cad18e801df3343b887d7ea5808f22 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sun, 30 Sep 2012 04:54:00 +0200 Subject: [PATCH] Fix buffer overflow - would probably be better to replace sprintf everywhere with snprintf - note to ekeeke --- libretro/libretro.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libretro/libretro.c b/libretro/libretro.c index 8957e79..5817399 100644 --- a/libretro/libretro.c +++ b/libretro/libretro.c @@ -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)