From 5d4dcc9fbf0f5c06b7e147829b5be5fd27fc8a55 Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Tue, 9 Sep 2025 13:57:44 +0200 Subject: [PATCH] log_error(): Fix segmentation fault ... when logging %E on a platform that isn't Windows and doesn't have strerror(). Reported by Joshua Rogers. --- errlog.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/errlog.c b/errlog.c index da6af45e..a3fb3781 100644 --- a/errlog.c +++ b/errlog.c @@ -843,7 +843,7 @@ void log_error(int loglevel, const char *fmt, ...) #ifdef HAVE_STRERROR format_string = strerror(ival); #else /* ifndef HAVE_STRERROR */ - format_string = NULL; + format_string = "Unable to convert errno to string."; #endif /* ndef HAVE_STRERROR */ if (sval == NULL) { -- 2.50.1