From: Andreas Schwab Date: Mon, 25 Jan 2010 15:17:47 +0000 (-0800) Subject: Fix error checking in iconv. X-Git-Tag: fedora/glibc-2.11.1-7~1^2~45 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4aa960e79da30982273b3e572e488c1de635cf53;p=thirdparty%2Fglibc.git Fix error checking in iconv. (cherry picked from commit 7a518360023592882a7335b843ce1a5ea322dec5) --- diff --git a/ChangeLog b/ChangeLog index cea6315b6ce..47f2e529d53 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2010-01-25 Andreas Schwab + + * iconv/iconv_prog.c (write_output): Fix check for open failure. + 2010-01-22 Ulrich Drepper [BZ #11200] diff --git a/iconv/iconv_prog.c b/iconv/iconv_prog.c index a1ca05f153c..3bcb9b464e8 100644 --- a/iconv/iconv_prog.c +++ b/iconv/iconv_prog.c @@ -442,7 +442,7 @@ write_output (const char *outbuf, const char *outptr, FILE **output, if (output_file != NULL && strcmp (output_file, "-") != 0) { *output = fopen (output_file, "w"); - if (output == NULL) + if (*output == NULL) error (EXIT_FAILURE, errno, _("cannot open output file")); } else