diff --git a/rsyslog-3.21.10-convVar.patch b/rsyslog-3.21.10-convVar.patch new file mode 100644 index 0000000..a8dc4d9 --- /dev/null +++ b/rsyslog-3.21.10-convVar.patch @@ -0,0 +1,33 @@ +diff -up rsyslog-3.21.10/runtime/stringbuf.c.convVar rsyslog-3.21.10/runtime/stringbuf.c +--- rsyslog-3.21.10/runtime/stringbuf.c.convVar 2009-03-13 21:32:55.000000000 +0100 ++++ rsyslog-3.21.10/runtime/stringbuf.c 2009-03-13 21:39:09.000000000 +0100 +@@ -820,7 +820,7 @@ rsCStrConvertToNumber(cstr_t *pStr, numb + /* TODO: octal? hex? */ + n = 0; + while(i < pStr->iStrLen && isdigit(pStr->pBuf[i])) { +- n = n * 10 + pStr->pBuf[i] * 10; ++ n = n * 10 + pStr->pBuf[i] - '0'; + ++i; + } + +diff -up rsyslog-3.21.10/runtime/var.c.convVar rsyslog-3.21.10/runtime/var.c +--- rsyslog-3.21.10/runtime/var.c.convVar 2009-03-13 00:31:48.000000000 +0100 ++++ rsyslog-3.21.10/runtime/var.c 2009-03-13 00:44:51.000000000 +0100 +@@ -366,7 +366,7 @@ ConvForOperation(var_t *pThis, var_t *pO + case VARTYPE_NUMBER: + /* check if we can convert pThis to a number, if so use number format. */ + iRet = ConvToNumber(pThis); +- if(iRet != RS_RET_NOT_A_NUMBER) { ++ if(iRet == RS_RET_NOT_A_NUMBER) { + CHKiRet(ConvToString(pOther)); + } else { + FINALIZE; /* OK or error */ +@@ -384,7 +384,7 @@ ConvForOperation(var_t *pThis, var_t *pO + break; + case VARTYPE_STR: + iRet = ConvToNumber(pOther); +- if(iRet != RS_RET_NOT_A_NUMBER) { ++ if(iRet == RS_RET_NOT_A_NUMBER) { + CHKiRet(ConvToString(pThis)); + } else { + FINALIZE; /* OK or error */ diff --git a/rsyslog.spec b/rsyslog.spec index 1b9a857..8587e5f 100644 --- a/rsyslog.spec +++ b/rsyslog.spec @@ -3,7 +3,7 @@ Summary: Enhanced system logging and kernel message trapping daemons Name: rsyslog Version: 3.21.10 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv3+ Group: System Environment/Daemons URL: http://www.rsyslog.com/ @@ -12,6 +12,7 @@ Source1: rsyslog.init Source2: rsyslog.conf Source3: rsyslog.sysconfig Source4: rsyslog.log +Patch0: rsyslog-3.21.10-convVar.patch BuildRequires: zlib-devel BuildRequires: autoconf automake Requires: logrotate >= 3.5.2 @@ -87,6 +88,7 @@ IETF standard protocol. %prep %setup -q +%patch0 -p1 -b .convVar %build export CFLAGS="$RPM_OPT_FLAGS -DSYSLOGD_PIDNAME=\\\"syslogd.pid\\\"" @@ -192,6 +194,9 @@ fi %{_libdir}/rsyslog/lmnsd_gtls.so %changelog +* Wed Mar 18 2009 Tomas Heinrich 3.21.10-3 +- fix variables' type conversion in expression-based filters (#485937) + * Wed Feb 25 2009 Fedora Release Engineering - 3.21.10-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild