]> git.ipfire.org Git - thirdparty/glibc.git/commit
iconv: Support in-place conversions (bug 10460, bug 32033)
authorFlorian Weimer <fweimer@redhat.com>
Fri, 20 Sep 2024 11:10:54 +0000 (13:10 +0200)
committerFlorian Weimer <fweimer@redhat.com>
Fri, 20 Sep 2024 11:51:09 +0000 (13:51 +0200)
commit8ef3cff9d1ceafe369f982d980678d749fb93bd2
tree10944be240ac4ed5aeeeb634c98e7836457a5d08
parent6cbf845fcdc76131d0e674cee454fe738b69c69d
iconv: Support in-place conversions (bug 10460, bug 32033)

Check if any of the input files overlaps with the output file, and use
a temporary file in this case, so that the input is no clobbered
before it is read.  This fixes bug 10460.  It allows to use iconv
more easily as a functional replacement for GNU recode.

The updated output buffer management truncates the output file
if there is no input, fixing bug 32033.

Reviewed-by: DJ Delorie <dj@redhat.com>
NEWS
iconv/Makefile
iconv/iconv_prog.c
iconv/tst-iconv_prog-buffer.sh