[packages/fwupdate] - added overflow patch (avoid implicit overflow warning by using explicit cast)

qboosh qboosh at pld-linux.org
Tue Nov 15 16:26:33 CET 2016


commit 66bfa4f8edb3ceb768d71671f9b09239d45b20f7
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Tue Nov 15 16:26:40 2016 +0100

    - added overflow patch (avoid implicit overflow warning by using explicit cast)

 fwupdate-overflow.patch | 11 +++++++++++
 fwupdate.spec           |  2 ++
 2 files changed, 13 insertions(+)
---
diff --git a/fwupdate.spec b/fwupdate.spec
index 8a4be7f..d9c176d 100644
--- a/fwupdate.spec
+++ b/fwupdate.spec
@@ -11,6 +11,7 @@ License:	GPL v2
 Group:		Libraries
 Source0:	https://github.com/rhinstaller/fwupdate/archive/%{version}/%{name}-%{version}.tar.gz
 # Source0-md5:	b68e67b706ac5f551e8fcab20cf43a60
+Patch0:		%{name}-overflow.patch
 URL:		https://github.com/rhinstaller/fwupdate
 BuildRequires:	efivar-devel >= 0.19
 BuildRequires:	gnu-efi
@@ -72,6 +73,7 @@ Bashowe uzupełnianie parametrów polecenia fwupdate.
 
 %prep
 %setup -q
+%patch0 -p1
 
 %if %{without pesign}
 %{__sed} -i -e 's/pesign/cp $< $@ \&\& : &/' efi/Makefile
diff --git a/fwupdate-overflow.patch b/fwupdate-overflow.patch
new file mode 100644
index 0000000..060e1c1
--- /dev/null
+++ b/fwupdate-overflow.patch
@@ -0,0 +1,11 @@
+--- fwupdate-8/efi/fwupdate.c.orig	2016-11-15 16:24:00.862246035 +0100
++++ fwupdate-8/efi/fwupdate.c	2016-11-15 16:24:06.562245972 +0100
+@@ -44,7 +44,7 @@
+ #endif
+ #ifndef uintn_mult
+ #define uintn_mult(a, b, c) ({					\
+-		const UINTN _limit = ~0ULL;			\
++		const UINTN _limit = (UINTN)~0ULL;		\
+ 		int _ret = 1;					\
+ 		if ((a) != 0 && (b) != 0) {			\
+ 			_ret = _limit / (a) < (b);		\
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/fwupdate.git/commitdiff/66bfa4f8edb3ceb768d71671f9b09239d45b20f7



More information about the pld-cvs-commit mailing list