]> git.ipfire.org Git - thirdparty/util-linux.git/commit
rev: Check for wchar conversion errors
authorTim Hallmann <tim@t8w.de>
Sun, 24 Mar 2024 19:14:30 +0000 (20:14 +0100)
committerKarel Zak <kzak@redhat.com>
Mon, 25 Mar 2024 18:40:46 +0000 (19:40 +0100)
commita610cf8231a02163a4a2b2faf3047d24798fe180
tree5d3fe0ff3d0735a93064ad4aab9404fbf0713a09
parent7af75457f9afce4dbea0d778a33c7689994c5343
rev: Check for wchar conversion errors

Commit c9cc84621ca98ef85499e83ca56f05f12055f193 introduced a regression
where only the actual EOF is handled, not other error conditions
returning WEOF. This leads to an infinite loop upon encountering
conversion errors. For example (using LC_CTYPE="en_US.UTF-8"):

$ printf '\x80' | rev

Signed-off-by: Tim Hallmann <tim@t8w.de>
text-utils/rev.c