From c96bb3660e89d4f4d45feb58d35262bb4ffca9c6 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Tue, 12 Feb 2008 11:19:48 +0000 Subject: fixed bug that caused invalid treatment of tabs (HT) in rsyslog.conf --- syslogd.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'syslogd.c') diff --git a/syslogd.c b/syslogd.c index 57fffbfe..396a540b 100644 --- a/syslogd.c +++ b/syslogd.c @@ -5536,13 +5536,12 @@ int getSubString(uchar **ppSrc, char *pDst, size_t DstSize, char cSep) { uchar *pSrc = *ppSrc; int iErr = 0; /* 0 = no error, >0 = error */ - while(*pSrc != cSep && *pSrc != '\n' && *pSrc != '\0' && DstSize>1) { + while((cSep == ' ' ? !isspace(*pSrc) : *pSrc != cSep) && *pSrc != '\n' && *pSrc != '\0' && DstSize>1) { *pDst++ = *(pSrc)++; DstSize--; } /* check if the Dst buffer was to small */ - if (*pSrc != cSep && *pSrc != '\n' && *pSrc != '\0') - { + if ((cSep == ' ' ? !isspace(*pSrc) : *pSrc != cSep) && *pSrc != '\n' && *pSrc != '\0') { dbgprintf("in getSubString, error Src buffer > Dst buffer\n"); iErr = 1; } -- cgit v1.2.3