From 33fc557df68b423f51ed278e1c80bd45c1ca225e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Deuc=D0=B5?= <shurd@sasktel.net>
Date: Thu, 8 Feb 2024 04:17:15 -0500
Subject: [PATCH] Possible fix warning in xpprintf() about using a pointer
 after free.

If this *does* work, it means that potentially a huge chunk of our
error checking hasn't actually worked in release builds or builds
that use the FORTIFY option.
---
 src/build/Common.gmake | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/build/Common.gmake b/src/build/Common.gmake
index dfe8dfc73b..cfe4c2b802 100644
--- a/src/build/Common.gmake
+++ b/src/build/Common.gmake
@@ -481,6 +481,7 @@ else # RELEASE
  # This also meant that -O3 wouldn't work either.
  CFLAGS	:= -O3 -Wno-unused-result -fomit-frame-pointer -ffast-math -funroll-loops $(CFLAGS)
 endif
+CFLAGS += -fno-delete-null-pointer-checks
 
 -include targets.mk
 -include $(SRC_ROOT)/build/rules.mk
-- 
GitLab