diff options
author | Florian Weimer <fweimer@redhat.com> | 2024-09-20 13:10:54 +0200 |
---|---|---|
committer | Florian Weimer <fweimer@redhat.com> | 2024-09-20 13:51:09 +0200 |
commit | 75819cdd29a193cc2db980878bec305905b22bbc (patch) | |
tree | 3892d3e4843021cb24a8ba57f0cec020b01a1031 /iconv/iconv_prog.c | |
parent | 8ef3cff9d1ceafe369f982d980678d749fb93bd2 (diff) | |
download | glibc-75819cdd29a193cc2db980878bec305905b22bbc.zip glibc-75819cdd29a193cc2db980878bec305905b22bbc.tar.gz glibc-75819cdd29a193cc2db980878bec305905b22bbc.tar.bz2 |
iconv: Multiple - on command line should not fail (bug 32050)
Usually, the second and subsequent - return EOF immediately
and do not contribute to the output, but this is not an error.
Reviewed-by: DJ Delorie <dj@redhat.com>
Diffstat (limited to 'iconv/iconv_prog.c')
-rw-r--r-- | iconv/iconv_prog.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/iconv/iconv_prog.c b/iconv/iconv_prog.c index 3e02db7..dd4bc3a 100644 --- a/iconv/iconv_prog.c +++ b/iconv/iconv_prog.c @@ -287,7 +287,8 @@ conversions from `%s' and to `%s' are not supported"), ret = process_fd (cd, fd); /* Now close the file. */ - close (fd); + if (fd != STDIN_FILENO) + close (fd); if (ret != 0) { |