Open GoogleCodeExporter opened 9 years ago
I looked a little deeper and it's a bug where the last line of an syslog-ng
conf file
is a comment.
Here's a patch:
diff -Naur /import/tonic/bedge/tools/llconf/src/parsers/syslogng.c
src/parsers/syslogng.c
--- /import/tonic/bedge/tools/llconf/src/parsers/syslogng.c 2008-07-22
09:21:00.000000000 -0700
+++ src/parsers/syslogng.c 2008-07-22 10:23:54.000000000 -0700
@@ -63,6 +63,10 @@
cl = cl->next;
p = cl->line;
}
+ if(cl->next == NULL) {
+ p = NULL;
+ break;
+ }
}
*pp = p;
return cl;
@@ -223,7 +227,7 @@
char buf[256];
cl = _skip_spaces(cl, &p);
- if(!*p) break;
+ if(!p || !*p) break;
if(*p){
dup_next_word_b(&p, buf, sizeof(buf)-1);
I'm sure that there's a cleaner way, but this was my attempt :-)
Thanks, Bruce
Original comment by bruce.e...@gmail.com
on 22 Jul 2008 at 5:27
Original issue reported on code.google.com by
bruce.e...@gmail.com
on 21 Jul 2008 at 11:54Attachments: