rpms/rsyslog/F-10 rsyslog-3.21.10-convVar.patch, NONE, 1.1 rsyslog.spec, 1.54, 1.55
Tomas Heinrich
theinric at fedoraproject.org
Tue Mar 31 12:56:18 UTC 2009
Author: theinric
Update of /cvs/extras/rpms/rsyslog/F-10
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv16209
Modified Files:
rsyslog.spec
Added Files:
rsyslog-3.21.10-convVar.patch
Log Message:
fix variables' type conversion in expression-based filters (#485937)
rsyslog-3.21.10-convVar.patch:
--- NEW FILE rsyslog-3.21.10-convVar.patch ---
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 */
Index: rsyslog.spec
===================================================================
RCS file: /cvs/extras/rpms/rsyslog/F-10/rsyslog.spec,v
retrieving revision 1.54
retrieving revision 1.55
diff -u -r1.54 -r1.55
--- rsyslog.spec 17 Feb 2009 16:37:20 -0000 1.54
+++ rsyslog.spec 31 Mar 2009 12:55:48 -0000 1.55
@@ -3,7 +3,7 @@
Summary: Enhanced system logging and kernel message trapping daemons
Name: rsyslog
Version: 3.21.10
-Release: 1%{?dist}
+Release: 2%{?dist}
License: GPLv3+
Group: System Environment/Daemons
URL: http://www.rsyslog.com/
@@ -12,6 +12,7 @@
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 @@
%prep
%setup -q
+%patch0 -p1 -b .convVar
%build
export CFLAGS="$RPM_OPT_FLAGS -DSYSLOGD_PIDNAME=\\\"syslogd.pid\\\""
@@ -192,6 +194,9 @@
%{_libdir}/rsyslog/lmnsd_gtls.so
%changelog
+* Tue Mar 31 2009 Tomas Heinrich <theinric at redhat.com> 3.21.10-2
+- fix variables' type conversion in expression-based filters (#485937)
+
* Tue Feb 17 2009 Tomas Heinrich <theinric at redhat.com> 3.21.10-1
- upgrade
More information about the fedora-extras-commits
mailing list