Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.busybox.net/busybox.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2005-09-12 23:17:03 +0400
committerEric Andersen <andersen@codepoet.org>2005-09-12 23:17:03 +0400
commite76da05b7502ffed2e9f51aa33e1d0f697d278b9 (patch)
treeeb8f8b29174b62c787cc9c9e8ee2f3b60327488a
parentab76d3acfdde339a84b90d0d61f3861eabc4bd2c (diff)
Kunihiko IMAI writes:
Hi, We're using busybox and thank the authors. I found a short buffer allocation at busybox/sysklod/syslod.c. It mis-declares length of filenames, seems to forget for '\0' or two column numbered suffix of backup files (ex. messages.10). Here is a patch for the problem. Thanks.
-rw-r--r--busybox/sysklogd/syslogd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/busybox/sysklogd/syslogd.c b/busybox/sysklogd/syslogd.c
index aecd35d58..8f9d75cc6 100644
--- a/busybox/sysklogd/syslogd.c
+++ b/busybox/sysklogd/syslogd.c
@@ -333,7 +333,7 @@ static void message(char *fmt, ...)
&& (lseek(fd,0,SEEK_END) > logFileSize) ) {
if(logFileRotate > 0) {
int i;
- char oldFile[(strlen(logFilePath)+3)], newFile[(strlen(logFilePath)+3)];
+ char oldFile[(strlen(logFilePath)+4)], newFile[(strlen(logFilePath)+4)];
for(i=logFileRotate-1;i>0;i--) {
sprintf(oldFile, "%s.%d", logFilePath, i-1);
sprintf(newFile, "%s.%d", logFilePath, i);