From 2575a37e239b44a5949cefa845735243782b31c9 Mon Sep 17 00:00:00 2001 From: Stefan Ritt Date: Fri, 21 Feb 2014 13:08:59 +0100 Subject: [PATCH] Increased buffer for shell commands --- src/elogd.c | 4 ++-- src/git-revision.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/elogd.c b/src/elogd.c index f73f4f43..21f71f63 100755 --- a/src/elogd.c +++ b/src/elogd.c @@ -865,7 +865,7 @@ int my_shell(char *cmd, char *result, int size) #ifdef OS_UNIX pid_t child_pid; int fh, status, i; - char str[256]; + char str[1024]; if ((child_pid = fork()) < 0) return 0; @@ -877,7 +877,7 @@ int my_shell(char *cmd, char *result, int size) memset(result, 0, size); fh = open("/tmp/elog-shell", O_RDONLY); if (fh > 0) { - i = read(fh, result, size); + i = read(fh, result, size-1); close(fh); } diff --git a/src/git-revision.h b/src/git-revision.h index f580d305..aaaa19f6 100644 --- a/src/git-revision.h +++ b/src/git-revision.h @@ -1 +1 @@ -#define GIT_REVISION "Wed Sep 25 14:25:38 2013 +0200 - bac715d" +#define GIT_REVISION "Mon Jan 13 09:25:57 2014 +0100 - a738232"