1Fix buffer overflow
2
3--- eflite-0.4.1.orig/es.c
4+++ eflite-0.4.1/es.c
5@@ -329,7 +329,7 @@
6 char *p;
7
8 p = getenv("HOME");
9- sprintf(buf, "%s/.es.conf", p);
10+ snprintf(buf, sizeof(buf), "%s/.es.conf", p);
11 fp = fopen(buf, "r");
12 if (!fp) fp = fopen("/etc/es.conf", "r");
13 if (!fp) return 1;
14@@ -438,7 +438,7 @@
15 char logname[200];
16
17 if ((flags & 0xffff) > DEBUG) return;
18- sprintf(logname, "%s/es.log", getenv("HOME"));
19+ snprintf(logname, sizeof(logname), "%s/es.log", getenv("HOME"));
20 va_start(arg, text);
21 vsnprintf(buf, 200, text, arg);
22 va_end(arg);