iconv can not process long stream
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
glibc (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
Iconv eats too much memory on large piped input.
Steps to reproduce
yes | iconv -f ascii -t utf-8 | head -n5
Expected: 5 lines of y
Observed: iconv tries to read its stdin to the very end (infinitely) until got killed by OOM Killer.
Suggested solution: apply the patch https:/
$ lsb_release -rd
Description: Ubuntu 20.04.5 LTS
Release: 20.04
$ iconv -V
iconv (Ubuntu GLIBC 2.31-0ubuntu9.14) 2.31
Copyright (C) 2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Ulrich Drepper.
$ apt-cache policy libc-bin
libc-bin:
Installed: 2.31-0ubuntu9.14
Candidate: 2.31-0ubuntu9.14