]> git.ipfire.org Git - thirdparty/gnulib.git/commitdiff
localename-unsafe: Fix handling of yue-Hans locale on macOS.
authorBruno Haible <bruno@clisp.org>
Sat, 4 Oct 2025 02:21:50 +0000 (04:21 +0200)
committerBruno Haible <bruno@clisp.org>
Sat, 4 Oct 2025 02:21:50 +0000 (04:21 +0200)
Reported by Grisha Levit <grishalevit@gmail.com> in
<https://lists.gnu.org/archive/html/bug-gnulib/2025-10/msg00002.html>.

* lib/localename-unsafe.c (langtag_entry): Adjust array dimensions of
elements.

ChangeLog
lib/localename-unsafe.c

index 325ef7d087fbc8fc3add5f76712dfa06888c9b93..b8f98a18ae8c363590630b4d7309fbdf531f6fbe 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2025-10-03  Bruno Haible  <bruno@clisp.org>
+
+       localename-unsafe: Fix handling of yue-Hans locale on macOS.
+       Reported by Grisha Levit <grishalevit@gmail.com> in
+       <https://lists.gnu.org/archive/html/bug-gnulib/2025-10/msg00002.html>.
+       * lib/localename-unsafe.c (langtag_entry): Adjust array dimensions of
+       elements.
+
 2025-10-03  Bruno Haible  <bruno@clisp.org>
 
        unimetadata/base: Add tests.
index 708aa28569b1b7e44de56ed34a699fbf395b9c44..08db8585cd1a0b887cccab3a3daa0f158066555b 100644 (file)
@@ -1299,7 +1299,7 @@ gl_locale_name_canonicalize (char *name)
 
   /* Convert new-style locale names with language tags (ISO 639 and ISO 15924)
      to Unix (ISO 639 and ISO 3166) names.  */
-  typedef struct { const char langtag[7+1]; const char unixy[12+1]; }
+  typedef struct { const char langtag[8+1]; const char unixy[5+1]; }
           langtag_entry;
   static const langtag_entry langtag_table[] = {
     /* Mac OS X has "az-Arab", "az-Cyrl", "az-Latn".