summaryrefslogtreecommitdiff
path: root/src/libs6
diff options
context:
space:
mode:
Diffstat (limited to 'src/libs6')
-rw-r--r--src/libs6/s6-ftrigrd.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/libs6/s6-ftrigrd.c b/src/libs6/s6-ftrigrd.c
index b766f36..efa7fe8 100644
--- a/src/libs6/s6-ftrigrd.c
+++ b/src/libs6/s6-ftrigrd.c
@@ -23,7 +23,7 @@
#include <s6/ftrigr.h>
#define FTRIGRD_MAXREADS 32
-#define FTRIGRD_BUFSIZE 16
+#define FTRIGRD_BUFSIZE 17
#define dienomem() strerr_diefu1sys(111, "stralloc_catb")
@@ -166,6 +166,12 @@ static int parse_protocol (unixmessage_t const *m, void *context)
answer(errno) ;
break ;
}
+ if (!buffer_init(&buffer_read, f.fd, f.buf, FTRIGRD_BUFSIZE))
+ {
+ ftrigio_deepfree(&f) ;
+ answer(errno) ;
+ break ;
+ }
if (!genalloc_append(ftrigio_t, &a, &f))
{
ftrigio_deepfree(&f) ;