forked from pool/glibc
Andreas Schwab
f252c599f1
- Update to glibc 2.38 * When C2X features are enabled and the base argument is 0 or 2, the following functions support binary integers prefixed by 0b or 0B as input * PRIb*, PRIB* and SCNb* macros from C2X have been added to <inttypes.h>. * printf-family functions now support the wN format length modifiers for arguments of type intN_t, int_leastN_t, uintN_t or uint_leastN_t and the wfN format length modifiers for arguments of type int_fastN_t or uint_fastN_t, as specified in draft ISO C2X * A new tunable, glibc.pthread.stack_hugetlb, can be used to disable Transparent Huge Pages (THP) in stack allocation at pthread_create * Vector math library libmvec support has been added to AArch64 * The strlcpy and strlcat functions have been added * CVE-2023-25139: When the printf family of functions is called with a format specifier that uses an <apostrophe> (enable grouping) and a minimum width specifier, the resulting output could be larger than reasonably expected by a caller that computed a tight bound on the buffer size - Enable build with _FORTIFY_SOURCE - glibc-2.3.90-langpackdir.diff: avoid reference to __strcpy_chk - iconv-error-verbosity.patch: iconv: restore verbosity with unrecognized encoding names (BZ #30694) - printf-grouping.patch, strftime-time64.patch, getlogin-no-loginuid.patch, fix-locking-in-_IO_cleanup.patch, gshadow-erange-rhandling.patch, system-sigchld-block.patch, gmon-buffer-alloc.patch, check-pf-cancel-handler.patch, powerpc64-fcntl-lock.patch, realloc-limit-chunk-reuse.patch, dl-find-object-return.patch; Removed OBS-URL: https://build.opensuse.org/request/show/1102127 OBS-URL: https://build.opensuse.org/package/show/Base:System/glibc?expand=0&rev=657
34 lines
1.0 KiB
Diff
34 lines
1.0 KiB
Diff
Index: glibc-2.38/intl/loadmsgcat.c
|
|
===================================================================
|
|
--- glibc-2.38.orig/intl/loadmsgcat.c
|
|
+++ glibc-2.38/intl/loadmsgcat.c
|
|
@@ -796,8 +796,26 @@ _nl_load_domain (struct loaded_l10nfile
|
|
if (domain_file->filename == NULL)
|
|
goto out;
|
|
|
|
- /* Try to open the addressed file. */
|
|
- fd = open (domain_file->filename, O_RDONLY | O_BINARY);
|
|
+ /* Replace /locale/ with /usr/share/locale-langpack/ */
|
|
+ const char *langpackdir = "/usr/share/locale-langpack/";
|
|
+ char *filename_langpack = malloc (strlen (domain_file->filename)
|
|
+ + strlen (langpackdir));
|
|
+ if (filename_langpack != NULL)
|
|
+ {
|
|
+ char *p = strstr (domain_file->filename, "/locale/");
|
|
+ if (p != NULL)
|
|
+ {
|
|
+ strcpy (__stpcpy (filename_langpack, langpackdir), p + 8);
|
|
+ fd = open (filename_langpack, O_RDONLY | O_BINARY);
|
|
+ }
|
|
+
|
|
+ free (filename_langpack);
|
|
+ }
|
|
+
|
|
+ if (fd == -1)
|
|
+ /* Try to open the addressed file. */
|
|
+ fd = open (domain_file->filename, O_RDONLY | O_BINARY);
|
|
+
|
|
if (fd == -1)
|
|
goto out;
|
|
|