summarylogtreecommitdiffstats
path: root/xalloc-oversized.patch
diff options
context:
space:
mode:
Diffstat (limited to 'xalloc-oversized.patch')
-rw-r--r--xalloc-oversized.patch11
1 files changed, 11 insertions, 0 deletions
diff --git a/xalloc-oversized.patch b/xalloc-oversized.patch
new file mode 100644
index 000000000000..3c6bc5d0761f
--- /dev/null
+++ b/xalloc-oversized.patch
@@ -0,0 +1,11 @@
+--- gl/xalloc-oversized.h.orig 2017-07-07 15:14:42.847504140 +0200
++++ gl/xalloc-oversized.h 2017-07-07 15:15:53.110835890 +0200
+@@ -46,7 +46,7 @@
+ /* GCC 7 __builtin_mul_overflow should easily compute this. See:
+ https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68120 */
+ #if 7 <= __GNUC__
+-# define xalloc_oversized(n, s) __builtin_mul_overflow (n, s, (size_t *) NULL)
++# define xalloc_oversized(n, s) __builtin_mul_overflow_p (n, s, (size_t) 1)
+
+ /* GCC 5 and Clang __builtin_mul_overflow needs a temporary, and
+ should be used only for non-constant operands, so that