Accepting request 597822 from home:marxin:branches:Apache

- Add gcc8-integer-overflow.patch to handle an undefined
  behavior (boo#1090085).

OBS-URL: https://build.opensuse.org/request/show/597822
OBS-URL: https://build.opensuse.org/package/show/Apache/apr?expand=0&rev=11
This commit is contained in:
Petr Gajdos 2018-04-19 08:25:24 +00:00 committed by Git OBS Bridge
parent ee33e46b65
commit c74d6562e9
3 changed files with 22 additions and 0 deletions

View File

@ -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

View File

@ -34,6 +34,7 @@ Patch4: apr-1.4.5-linux3.patch
Patch5: apr-visibility.patch
Patch6: apr-use-getrandom.patch
Patch9: apr-proc-mutex-map-anon.patch
Patch10: gcc8-integer-overflow.patch
BuildRequires: doxygen
BuildRequires: fdupes
BuildRequires: libtool
@ -87,6 +88,7 @@ that want to make use of APR.
%patch5 -p1
%patch6 -p1
%patch9 -p1
%patch10 -p1
# Do not put date to doxy content
sed -i \

View 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);