diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2008-05-05 14:34:13 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2008-05-05 14:34:13 +0200 |
commit | 62097331cc5fa04aab34bf0c1fb812d62752d0a7 (patch) | |
tree | c1ce6b63300a488995fe45b0a9daf5d353bba9ce | |
parent | 7022e9019ebf9bf48ffd17ac11099f9cc2f22e4d (diff) | |
download | rsyslog-62097331cc5fa04aab34bf0c1fb812d62752d0a7.tar.gz rsyslog-62097331cc5fa04aab34bf0c1fb812d62752d0a7.tar.xz rsyslog-62097331cc5fa04aab34bf0c1fb812d62752d0a7.zip |
invalid strdup when no driver name was set caused segfault
-rw-r--r-- | tools/omfwd.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/omfwd.c b/tools/omfwd.c index 113c3bef..59245536 100644 --- a/tools/omfwd.c +++ b/tools/omfwd.c @@ -567,7 +567,8 @@ CODE_STD_STRING_REQUESTparseSelectorAct(1) CHKiRet(tcpclt.SetSendPrepRetry(pData->pTCPClt, TCPSendPrepRetry)); CHKiRet(tcpclt.SetFraming(pData->pTCPClt, tcp_framing)); pData->iStrmDrvrMode = iStrmDrvrMode; - CHKmalloc(pData->pszStrmDrvr = (uchar*)strdup((char*)pszStrmDrvr)); + if(pData->pszStrmDrvr != NULL) + CHKmalloc(pData->pszStrmDrvr = (uchar*)strdup((char*)pszStrmDrvr)); } CODE_STD_FINALIZERparseSelectorAct |