iconv: Remove alloca use in gconv-modules configuration parsing
commite3217c7fd9e67aa2d53700bb1da9a966e73b9684
authorSiddhesh Poyarekar <siddhesh@sourceware.org>
Wed, 9 Jun 2021 19:11:35 +0000 (10 00:41 +0530)
committerSiddhesh Poyarekar <siddhesh@sourceware.org>
Wed, 23 Jun 2021 03:24:13 +0000 (23 08:54 +0530)
tree92ce340ce752510268401f64d215cdd14c0f1769
parente8d52b64a54ba9ed7778ca9ce1f084eb5808f8d1
iconv: Remove alloca use in gconv-modules configuration parsing

The alloca sizes ought to be constrained to PATH_MAX, but replace them
with dynamic allocation to be safe.  A static PATH_MAX array would
have worked too but Hurd does not have PATH_MAX and the code path is
not hot enough to micro-optimise this allocation.  Revisit if any of
those realities change.

Reviewed-by: DJ Delorie <dj@redhat.com>
iconv/gconv_conf.c
iconv/iconvconfig.c