MINGW-packages/mingw-w64-p11-kit/0013-fix-reallocarray-decl.patch
Christoph Reiter 490c1e20cf p11-kit: fix "trust list" crashing
The code in compat.h assumes that HAVE_DECL_REALLOCARRAY is defined
and 0, but with autotools it's just not defined, leading to reallocarray
not being declared.

One reason why this started crashing now might be our new linker hardening flags
leading to larger pointer values.

Hopefully fixes #7166
2020-10-25 22:50:02 +01:00

12 lines
414 B
Diff

--- p11-kit-0.23.21/common/compat.h.orig 2020-10-25 22:40:35.843040200 +0100
+++ p11-kit-0.23.21/common/compat.h 2020-10-25 22:41:06.882100100 +0100
@@ -294,7 +294,7 @@
#endif /* HAVE_STRDUP */
-#if defined HAVE_DECL_REALLOCARRAY && !HAVE_DECL_REALLOCARRAY
+#if !defined(HAVE_DECL_REALLOCARRAY) || !HAVE_DECL_REALLOCARRAY
void * reallocarray (void *ptr,
size_t nmemb,