From 867eee280bd968b9d6ca7d6a7b0d88ab1dc0d73a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Wed, 1 May 2024 10:14:27 +0100 Subject: [PATCH] WaE: C6011 Dereferencing NULL pointer warnings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I5a4d2982b5d980704dfc19fd92d01fd8aeefe144 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166952 Reviewed-by: Caolán McNamara Tested-by: Jenkins --- external/dtoa/C6011.patch.0 | 10 ++++++++++ external/dtoa/UnpackedTarball_dtoa.mk | 1 + 2 files changed, 11 insertions(+) create mode 100644 external/dtoa/C6011.patch.0 diff --git a/external/dtoa/C6011.patch.0 b/external/dtoa/C6011.patch.0 new file mode 100644 index 000000000000..a5e55e34f179 --- /dev/null +++ b/external/dtoa/C6011.patch.0 @@ -0,0 +1,10 @@ +--- src/dtoa.c 2024-05-01 10:10:49.702762020 +0100 ++++ src/dtoa.c 2024-05-01 10:11:45.308831303 +0100 +@@ -1606,6 +1606,7 @@ + else + rv = (Bigint*)MALLOC(len*sizeof(double)); + #endif ++ assert(rv && "Don't handle OOM conditions"); + rv->k = k; + rv->maxwds = x; + } diff --git a/external/dtoa/UnpackedTarball_dtoa.mk b/external/dtoa/UnpackedTarball_dtoa.mk index bc4fe55b5a7e..d1702085cd6f 100644 --- a/external/dtoa/UnpackedTarball_dtoa.mk +++ b/external/dtoa/UnpackedTarball_dtoa.mk @@ -17,6 +17,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,dtoa, \ external/dtoa/include_header.patch \ external/dtoa/coverity.patch \ external/dtoa/ubsan.patch.0 \ + external/dtoa/C6011.patch.0 \ )) # vim: set noet sw=4 ts=4: