From a1f8c181098933a557dcd8f59433d5f3b07dac3b Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Thu, 1 Feb 2024 12:45:30 +0100 Subject: [PATCH] =?UTF-8?q?proc:=20fix=20`error:=20the=20address=20of=20?= =?UTF-8?q?=E2=80=98iso15924=E2=80=99=20will=20never=20be=20NULL`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The `iso15924` variable is not actually a pointer. Signed-off-by: Johannes Schindelin --- winsup/cygwin/fhandler/proc.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/winsup/cygwin/fhandler/proc.cc b/winsup/cygwin/fhandler/proc.cc index be107cb8ea..cf40e8262c 100644 --- a/winsup/cygwin/fhandler/proc.cc +++ b/winsup/cygwin/fhandler/proc.cc @@ -2153,7 +2153,7 @@ format_proc_locale_proc (LPWSTR win_locale, DWORD info, LPARAM param) if (!(cp2 = wcschr (cp + 2, L'-'))) return TRUE; /* Otherwise, store in iso15924 */ - if (iso15924) + if (cp2 - cp + 1 < ENCODING_LEN) wcpcpy (wcpncpy (iso15924, cp, cp2 - cp), L";"); } cp = wcsrchr (win_locale, L'-');