aboutsummaryrefslogtreecommitdiff
path: root/iconv/Makefile
diff options
context:
space:
mode:
authorSiddhesh Poyarekar <siddhesh@sourceware.org>2021-06-28 09:15:55 +0530
committerSiddhesh Poyarekar <siddhesh@sourceware.org>2021-06-28 09:15:55 +0530
commit9429049c178b3af3d6afeb3717ff1f2214dc9572 (patch)
tree5326e9e4118c65d9511ae55b3a7c2e20bf854ef9 /iconv/Makefile
parent5adda61f62b77384718b4c0d8336ade8f2b4b35c (diff)
downloadglibc-9429049c178b3af3d6afeb3717ff1f2214dc9572.tar
glibc-9429049c178b3af3d6afeb3717ff1f2214dc9572.tar.gz
glibc-9429049c178b3af3d6afeb3717ff1f2214dc9572.tar.bz2
glibc-9429049c178b3af3d6afeb3717ff1f2214dc9572.zip
iconvconfig: Fix multiple issues
It was noticed on big-endian systems that msgfmt would fail with the following error: msgfmt: gconv_builtin.c:70: __gconv_get_builtin_trans: Assertion `cnt < sizeof (map) / sizeof (map[0])' failed. Aborted (core dumped) This is only seen on installed systems because it was due to a corrupted gconv-modules.cache. iconvconfig had the following issues (it was specifically freeing fulldir that caused this issue, but other cleanups are also needed) that this patch fixes. - Add prefix only if dir starts with '/' - Use asprintf instead of mempcpy so that the directory string is NULL terminated - Make a copy of the directory reference in new_module so that fulldir can be freed within the same scope in handle_dir. Reviewed-by: Florian Weimer <fweimer@redhat.com>
Diffstat (limited to 'iconv/Makefile')
-rw-r--r--iconv/Makefile2
1 files changed, 1 insertions, 1 deletions
diff --git a/iconv/Makefile b/iconv/Makefile
index a9b267c851..07d77c9eca 100644
--- a/iconv/Makefile
+++ b/iconv/Makefile
@@ -33,7 +33,7 @@ vpath %.c ../locale/programs ../intl
iconv_prog-modules = iconv_charmap charmap charmap-dir linereader \
dummy-repertoire simple-hash xstrdup xmalloc \
record-status
-iconvconfig-modules = strtab xmalloc hash-string
+iconvconfig-modules = strtab xmalloc xasprintf xstrdup hash-string
extra-objs = $(iconv_prog-modules:=.o) $(iconvconfig-modules:=.o)
CFLAGS-iconv_prog.c += -I../locale/programs
CFLAGS-iconv_charmap.c += -I../locale/programs