[libtevent/f18] Apply a patch from upstream to fix tevent_poll's additional_flags on 32bit architectures
Jakub Hrozek
jhrozek at fedoraproject.org
Wed Jun 19 08:49:16 UTC 2013
commit 299a3667ebc1464afc60ecaa473571b21d05f1af
Author: Jakub Hrozek <jhrozek at redhat.com>
Date: Wed Jun 19 10:19:32 2013 +0200
Apply a patch from upstream to fix tevent_poll's additional_flags on 32bit architectures
- Resolves: rhbz#975490
...Coverity-ID-989236-Operands-don-t-affect-.patch | 26 ++++++++++++++++++++
libtevent.spec | 10 +++++++-
2 files changed, 35 insertions(+), 1 deletions(-)
---
diff --git a/0001-tevent-Fix-Coverity-ID-989236-Operands-don-t-affect-.patch b/0001-tevent-Fix-Coverity-ID-989236-Operands-don-t-affect-.patch
new file mode 100644
index 0000000..6e2d8e5
--- /dev/null
+++ b/0001-tevent-Fix-Coverity-ID-989236-Operands-don-t-affect-.patch
@@ -0,0 +1,26 @@
+From dd0e38b5feb51c8aa44e76bb6c84202bf8373005 Mon Sep 17 00:00:00 2001
+From: Volker Lendecke <vl at samba.org>
+Date: Thu, 13 Jun 2013 20:35:32 +0200
+Subject: [PATCH] tevent: Fix Coverity ID 989236 Operands don't affect result
+
+"unsigned" could be less than uint64_t, so idx==UINT64_MAX is always false.
+
+Signed-off-by: Volker Lendecke <vl at samba.org>
+Reviewed-by: Jeremy Allison <jra at samba.org>
+
+diff --git a/lib/tevent/tevent_poll.c b/lib/tevent/tevent_poll.c
+index c6e2a00ffec6393fd6fccc1a3836f63e4ef4e045..75d0ced5a09ea86505a5df49b3c84073d3aa0f02 100644
+--- a/lib/tevent/tevent_poll.c
++++ b/lib/tevent/tevent_poll.c
+@@ -546,7 +546,7 @@ static int poll_event_loop_poll(struct tevent_context *ev,
+ the handler to remove itself when called */
+
+ for (fde = ev->fd_events; fde; fde = fde->next) {
+- unsigned idx = fde->additional_flags;
++ uint64_t idx = fde->additional_flags;
+ struct pollfd *pfd;
+ uint16_t flags = 0;
+
+--
+1.8.2.1
+
diff --git a/libtevent.spec b/libtevent.spec
index 131b630..0946da6 100644
--- a/libtevent.spec
+++ b/libtevent.spec
@@ -6,7 +6,7 @@
Name: libtevent
Version: 0.9.18
-Release: 1%{?dist}
+Release: 2%{?dist}
Group: System Environment/Daemons
Summary: The tevent library
License: LGPLv3+
@@ -24,6 +24,7 @@ BuildRequires: libxslt
Provides: bundled(libreplace)
# Patches
+Patch0001: 0001-tevent-Fix-Coverity-ID-989236-Operands-don-t-affect-.patch
%description
Tevent is an event system based on the talloc memory management library.
@@ -69,6 +70,8 @@ UpdateTimestamps() {
%setup -q -n tevent-%{version}
+%patch0001 -p3 -b .flags
+
%build
%configure --disable-rpath \
--bundled-libraries=NONE \
@@ -117,6 +120,11 @@ rm -rf $RPM_BUILD_ROOT
%postun -p /sbin/ldconfig
%changelog
+* Wed Jun 19 2013 Jakub Hrozek <jhrozek at redhat.com> - 0.9.18-2
+- Apply a patch from upstream to fix tevent_poll's additional_flags
+ on 32bit architectures
+- Resolves: rhbz#975490
+
* Mon Mar 18 2013 Jakub Hrozek <jhrozek at redhat.com> - 0.9.18-1
- New upstream release 0.9.18
More information about the scm-commits
mailing list