Hi,

With MALLOC_OPTIONS=J rsyslogd crashes when it receives a line via
UDP in debug mode.  There is no terminating '\0', so it tries to
print the line infinitly.  Without debug printing, the missing '\0'
is added later.

I found this while testing interoprability of our syslogd with
rsyslog.

ok?

bluhm

Index: sysutils/rsyslog/Makefile
===================================================================
RCS file: /data/mirror/openbsd/cvs/ports/sysutils/rsyslog/Makefile,v
retrieving revision 1.21
diff -u -p -r1.21 Makefile
--- sysutils/rsyslog/Makefile   9 Jan 2015 21:04:02 -0000       1.21
+++ sysutils/rsyslog/Makefile   9 Jan 2015 21:04:16 -0000
@@ -20,7 +20,7 @@ PKGNAME-mysql =               rsyslog-mysql-$V
 PKGNAME-pgsql =                rsyslog-pgsql-$V
 CATEGORIES =           sysutils
 
-REVISION-main =                6
+REVISION-main =                7
 REVISION-docs =                0
 REVISION-mysql =       6
 REVISION-pgsql =       3
Index: sysutils/rsyslog/patches/patch-plugins_imudp_imudp_c
===================================================================
RCS file: sysutils/rsyslog/patches/patch-plugins_imudp_imudp_c
diff -N sysutils/rsyslog/patches/patch-plugins_imudp_imudp_c
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ sysutils/rsyslog/patches/patch-plugins_imudp_imudp_c        9 Jan 2015 
21:32:33 -0000
@@ -0,0 +1,12 @@
+$OpenBSD$
+--- plugins/imudp/imudp.c.orig Thu Aug  5 11:33:54 2010
++++ plugins/imudp/imudp.c      Fri Jan  9 22:31:59 2015
+@@ -241,6 +241,8 @@ processSocket(int fd, struct sockaddr_storage *fromine
+                       }
+               }
+ 
++              if(Debug)
++                      pRcvBuf[lenRcvBuf] = '\0';
+               DBGPRINTF("recv(%d,%d)/%s,acl:%d,msg:%s\n", fd, (int) 
lenRcvBuf, fromHost, *pbIsPermitted, pRcvBuf);
+ 
+               if(*pbIsPermitted)  {

Reply via email to