[Privoxy-commits] [privoxy] 02/16: log_error(): Fix segmentation fault

User Git git at git.privoxy.org
Thu Oct 9 11:51:24 CEST 2025


This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch master
in repository privoxy.

commit 5d4dcc9fbf0f5c06b7e147829b5be5fd27fc8a55
Author: Fabian Keil <fk at fabiankeil.de>
AuthorDate: Tue Sep 9 13:57:44 2025 +0200

    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)
             {

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Privoxy-commits mailing list