From 80cc7fdf78fbda3f154666f20a2868988dcc68b2 Mon Sep 17 00:00:00 2001 From: Sebastian Harl Date: Fri, 8 Dec 2006 15:12:00 +0100 Subject: [PATCH] email plugin: Prevent a segfault in read_line (). Signed-off-by: Sebastian Harl --- src/email.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/email.c b/src/email.c index 58d94d1d..c1e139ea 100644 --- a/src/email.c +++ b/src/email.c @@ -332,7 +332,7 @@ char *read_line (collector_t *src) break; } - if ('\n' != src->buffer[i]) { + if (i == src->idx) { fd_set fdset; ssize_t len = 0; @@ -369,7 +369,7 @@ char *read_line (collector_t *src) break; } - if ('\n' != src->buffer[i]) { + if (i == src->idx) { ret = (char *)smalloc (1); ret[0] = '\0'; -- 2.30.2