summarylogtreecommitdiffstats
path: root/xalloc-oversized.patch
blob: 3c6bc5d0761f86842e7ba103bb8939c7e1243541 (plain)
1
2
3
4
5
6
7
8
9
10
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