summaryrefslogtreecommitdiffstats
path: root/syslogd.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2008-02-12 11:19:48 +0000
committerRainer Gerhards <rgerhards@adiscon.com>2008-02-12 11:19:48 +0000
commitc96bb3660e89d4f4d45feb58d35262bb4ffca9c6 (patch)
tree312070d9e70117b36ac0ed94aacb807c8bd50975 /syslogd.c
parenta3021f86318f5fbec829a73146cf78105490b178 (diff)
downloadrsyslog-c96bb3660e89d4f4d45feb58d35262bb4ffca9c6.tar.gz
rsyslog-c96bb3660e89d4f4d45feb58d35262bb4ffca9c6.tar.xz
rsyslog-c96bb3660e89d4f4d45feb58d35262bb4ffca9c6.zip
fixed bug that caused invalid treatment of tabs (HT) in rsyslog.conf
Diffstat (limited to 'syslogd.c')
-rw-r--r--syslogd.c5
1 files changed, 2 insertions, 3 deletions
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;
}