From 4becae174a3301eac5955f7900d3eef66728e440 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Wed, 30 Jan 2008 13:54:20 +0000 Subject: - fixed a bug that could cause invalid string handling via strerror_r varmojfekoj provided the patch - many thanks! - adopted varmojfekoj's patch to v3, some more sterror_r's ;) --- plugins/imudp/imudp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'plugins/imudp') diff --git a/plugins/imudp/imudp.c b/plugins/imudp/imudp.c index d68e3772..fa9db53a 100644 --- a/plugins/imudp/imudp.c +++ b/plugins/imudp/imudp.c @@ -37,6 +37,7 @@ #include "net.h" #include "cfsysline.h" #include "module-template.h" +#include "srUtils.h" MODULE_TYPE_INPUT @@ -200,7 +201,7 @@ CODESTARTrunInput } } else if (l < 0 && errno != EINTR && errno != EAGAIN) { char errStr[1024]; - strerror_r(errno, errStr, sizeof(errStr)); + rs_strerror_r(errno, errStr, sizeof(errStr)); dbgprintf("INET socket error: %d = %s.\n", errno, errStr); logerror("recvfrom inet"); /* should be harmless */ -- cgit