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 ;) --- syslogd.c | 15 --------------- 1 file changed, 15 deletions(-) (limited to 'syslogd.c') diff --git a/syslogd.c b/syslogd.c index 5d2531bf..0f0076ed 100644 --- a/syslogd.c +++ b/syslogd.c @@ -4132,21 +4132,6 @@ int decode(uchar *name, struct code *codetab) } - -char *rs_strerror_r(int errnum, char *buf, size_t buflen) { -#ifdef STRERROR_R_CHAR_P - char *p = strerror_r(errnum, buf, buflen); - if (p != buf) { - strncpy(buf, p, buflen); - buf[buflen - 1] = '\0'; - } -#else - strerror_r(errnum, buf, buflen); -#endif - return buf; -} - - /* * The following function is resposible for handling a SIGHUP signal. Since * we are now doing mallocs/free as part of init we had better not being -- cgit