From 247aa36062d3b5172add608af3198c0d9e02fdfb Mon Sep 17 00:00:00 2001 From: Dave Murphy Date: Fri, 3 Sep 2010 18:49:11 +0000 Subject: [PATCH] avoid buffer overflow --- source/libfat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/libfat.c b/source/libfat.c index 0dfb476..3716c74 100644 --- a/source/libfat.c +++ b/source/libfat.c @@ -82,7 +82,7 @@ bool fatMount (const char* name, const DISC_INTERFACE* interface, sec_t startSec return false; char devname[10]; - sprintf(devname, "%s:", name); + snprintf(devname, 10, "%s:", name); if(FindDevice(devname) >= 0) return true;