From: Bruno Haible Date: Mon, 17 Jun 2024 14:47:56 +0000 (+0200) Subject: nstrftime, c-nstrftime: Fix crash on Solaris 11.4. X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=a7d72a25473057908cd064677d3506ca3cd533e6;p=gnulib.git nstrftime, c-nstrftime: Fix crash on Solaris 11.4. * lib/strftime.c (__strftime_internal): Restore protection against zone being NULL. --- diff --git a/ChangeLog b/ChangeLog index 95aa6ef107..aaf0153f09 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2024-06-17 Bruno Haible + + nstrftime, c-nstrftime: Fix crash on Solaris 11.4. + * lib/strftime.c (__strftime_internal): Restore protection against zone + being NULL. + 2024-06-17 Bruno Haible time_rz: Fix link errors on NetBSD (regression yesterday). diff --git a/lib/strftime.c b/lib/strftime.c index e33dbb8f7c..e422267913 100644 --- a/lib/strftime.c +++ b/lib/strftime.c @@ -949,6 +949,8 @@ __strftime_internal (STREAM_OR_CHAR_T *s, STRFTIME_ARG (size_t maxsize) zone = "GMT"; } #endif + if (! zone) + zone = ""; if (hour12 > 12) hour12 -= 12;