]> git.ipfire.org Git - thirdparty/glibc.git/commit
Rewrite iconv option parsing [BZ #19519]
authorArjun Shankar <arjun@redhat.com>
Tue, 7 Jul 2020 18:31:48 +0000 (20:31 +0200)
committerDmitry V. Levin <ldv@altlinux.org>
Mon, 30 Nov 2020 22:59:53 +0000 (22:59 +0000)
commitec51be40c787782ceac65a33dc163c8b61bc54d1
tree1769b237fdb67dc3823ac17b74f7bf4b5998bcf7
parentbdaa594506063a760cf0308a8db2d2524c51839e
Rewrite iconv option parsing [BZ #19519]

This commit replaces string manipulation during `iconv_open' and iconv_prog
option parsing with a structured, flag based conversion specification.  In
doing so, it alters the internal `__gconv_open' interface and accordingly
adjusts its uses.

This change fixes several hangs in the iconv program and therefore includes
a new test to exercise iconv_prog options that originally led to these hangs.
It also includes a new regression test for option handling in the iconv
function.

Reviewed-by: Florian Weimer <fweimer@redhat.com>
Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
(cherry picked from commit 91927b7c76437db860cd86a7714476b56bb39d07)
12 files changed:
NEWS
iconv/Makefile
iconv/Versions
iconv/gconv_charset.c [new file with mode: 0644]
iconv/gconv_charset.h
iconv/gconv_int.h
iconv/gconv_open.c
iconv/iconv_open.c
iconv/iconv_prog.c
iconv/tst-iconv-opt.c [new file with mode: 0644]
iconv/tst-iconv_prog.sh [new file with mode: 0644]
intl/dcigettext.c