Package: belocs-locales-bin
Version: 2.4-1
Severity: normal
Tags: patch

(This was discovered by code inspection while trying to get the Ubuntu
installer working with glibc 2.4; I haven't actually reproduced a
problem in practice yet that can be attributed to this bug.)

The different handling of hash collisions that represents the difference
between magics 20031115 and 20051014 doesn't appear to work in
belocs-locales-bin's localedef, because ld-collate.c calls LIMAGIC at
one point with category 0 (LC_CTYPE) whereas the implementation of
LIMAGIC smashes 20051014 down to 20031115 for all categories other than
LC_COLLATE. Patch attached to fix the LIMAGIC call.

Thanks,

-- 
Colin Watson                                       [EMAIL PROTECTED]
diff -u belocs-locales-bin-2.4/locale/programs/ld-collate.c 
belocs-locales-bin-2.4/locale/programs/ld-collate.c
--- belocs-locales-bin-2.4/locale/programs/ld-collate.c
+++ belocs-locales-bin-2.4/locale/programs/ld-collate.c
@@ -2588,7 +2588,7 @@
              /* The spot is already taken.  Try iterating using the value
                 from the secondary hashing function.  */
              size_t iter = hash % (elem_size - 2) + 1;
-             if ((LIMAGIC (0)) < 0x20051014)
+             if ((LIMAGIC (LC_COLLATE)) < 0x20051014)
                {
                  iter--;
                  if (iter == 0)

Reply via email to