Accepting request 598066 from Apache
- Add gcc8-integer-overflow.patch to handle an undefined behavior (boo#1090085). (forwarded request 597822 from marxin) OBS-URL: https://build.opensuse.org/request/show/598066 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/apr?expand=0&rev=6
This commit is contained in:
commit
54a06c8df2
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Apr 18 15:33:14 UTC 2018 - mliska@suse.cz
|
||||||
|
|
||||||
|
- Add gcc8-integer-overflow.patch to handle an undefined
|
||||||
|
behavior (boo#1090085).
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue Jan 23 12:26:11 UTC 2018 - normand@linux.vnet.ibm.com
|
Tue Jan 23 12:26:11 UTC 2018 - normand@linux.vnet.ibm.com
|
||||||
|
|
||||||
|
2
apr.spec
2
apr.spec
@ -34,6 +34,7 @@ Patch4: apr-1.4.5-linux3.patch
|
|||||||
Patch5: apr-visibility.patch
|
Patch5: apr-visibility.patch
|
||||||
Patch6: apr-use-getrandom.patch
|
Patch6: apr-use-getrandom.patch
|
||||||
Patch9: apr-proc-mutex-map-anon.patch
|
Patch9: apr-proc-mutex-map-anon.patch
|
||||||
|
Patch10: gcc8-integer-overflow.patch
|
||||||
BuildRequires: doxygen
|
BuildRequires: doxygen
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: libtool
|
BuildRequires: libtool
|
||||||
@ -87,6 +88,7 @@ that want to make use of APR.
|
|||||||
%patch5 -p1
|
%patch5 -p1
|
||||||
%patch6 -p1
|
%patch6 -p1
|
||||||
%patch9 -p1
|
%patch9 -p1
|
||||||
|
%patch10 -p1
|
||||||
|
|
||||||
# Do not put date to doxy content
|
# Do not put date to doxy content
|
||||||
sed -i \
|
sed -i \
|
||||||
|
14
gcc8-integer-overflow.patch
Normal file
14
gcc8-integer-overflow.patch
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
diff --git a/test/teststr.c b/test/teststr.c
|
||||||
|
index d9a505475..7c945886d 100644
|
||||||
|
--- a/test/teststr.c
|
||||||
|
+++ b/test/teststr.c
|
||||||
|
@@ -307,7 +307,8 @@ static void overflow_strfsize(abts_case *tc, void *data)
|
||||||
|
for (; off < 999999999; off += 999) {
|
||||||
|
apr_strfsize(off, buf);
|
||||||
|
}
|
||||||
|
- for (off = 1; off < LONG_MAX && off > 0; off *= 2) {
|
||||||
|
+ /* Be carefull about integer overflow. */
|
||||||
|
+ for (off = 1; off < (LONG_MAX / 4) && off > 0; off *= 2) {
|
||||||
|
apr_strfsize(off, buf);
|
||||||
|
apr_strfsize(off + 1, buf);
|
||||||
|
apr_strfsize(off - 1, buf);
|
Loading…
x
Reference in New Issue
Block a user