summaryrefslogtreecommitdiffstats
path: root/package/busybox/patches/991-upstream_logger_fix.patch
diff options
context:
space:
mode:
authornbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2007-10-05 00:38:19 +0000
committernbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2007-10-05 00:38:19 +0000
commitb7502fe7f1547515271813be19fced039c5de3e7 (patch)
treef886a1669f566236546fa87ddb391fb84345e09b /package/busybox/patches/991-upstream_logger_fix.patch
parente8b81c92e78dc781a9569d7d51bd4f98d89237f8 (diff)
add upstream fixes for 1.7.2
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@9131 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/busybox/patches/991-upstream_logger_fix.patch')
-rw-r--r--package/busybox/patches/991-upstream_logger_fix.patch26
1 files changed, 26 insertions, 0 deletions
diff --git a/package/busybox/patches/991-upstream_logger_fix.patch b/package/busybox/patches/991-upstream_logger_fix.patch
new file mode 100644
index 000000000..e02123b5d
--- /dev/null
+++ b/package/busybox/patches/991-upstream_logger_fix.patch
@@ -0,0 +1,26 @@
+diff -urN busybox-1.7.2/sysklogd/logger.c busybox-1.7.2-logger/sysklogd/logger.c
+--- busybox-1.7.2/sysklogd/logger.c 2007-09-03 12:48:35.000000000 +0100
++++ busybox-1.7.2-logger/sysklogd/logger.c 2007-10-02 10:56:53.000000000 +0100
+@@ -107,7 +107,7 @@
+ argv += optind;
+ if (!argc) {
+ #define strbuf bb_common_bufsiz1
+- while (fgets(strbuf, BUFSIZ, stdin)) {
++ while (fgets(strbuf, COMMON_BUFSIZE, stdin)) {
+ if (strbuf[0]
+ && NOT_LONE_CHAR(strbuf, '\n')
+ ) {
+@@ -117,11 +117,11 @@
+ }
+ } else {
+ char *message = NULL;
+- int len = 1; /* for NUL */
++ int len = 0;
+ int pos = 0;
+ do {
+ len += strlen(*argv) + 1;
+- message = xrealloc(message, len);
++ message = xrealloc(message, len + 1);
+ sprintf(message + pos, " %s", *argv),
+ pos = len;
+ } while (*++argv);