1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
|
From: Debian Games Team <pkg-games-devel@lists.alioth.debian.org>
Date: Sun, 30 Mar 2014 21:01:08 +0200
Subject: fix-buffer-overflow
---
src/config.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/config.c b/src/config.c
index 6379b26..95cbd5f 100644
--- a/src/config.c
+++ b/src/config.c
@@ -21,7 +21,7 @@ int config_setup()
}
if (getenv("HOME"))
{
- sprintf(cbuf,"%s/%s",getenv("HOME"),USER_CONFIG_FILE);
+ snprintf(cbuf,sizeof(cbuf),"%s/%s",getenv("HOME"),USER_CONFIG_FILE);
cfile = fopen(cbuf,"r");
if (cfile)
{
|