projects
/
collectd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
168e694
)
email plugin: Prevent a segfault in read_line ().
author
Sebastian Harl
<sh@tokkee.org>
Fri, 8 Dec 2006 14:12:00 +0000
(15:12 +0100)
committer
Florian Forster
<octo@huhu.verplant.org>
Fri, 8 Dec 2006 14:29:34 +0000
(15:29 +0100)
Signed-off-by: Sebastian Harl <sh@tokkee.org>
src/email.c
patch
|
blob
|
history
diff --git
a/src/email.c
b/src/email.c
index
58d94d1
..
c1e139e
100644
(file)
--- 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';