From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2155) id D4C02386F457; Fri, 10 Jul 2020 10:03:15 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D4C02386F457 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Corinna Vinschen To: newlib-cvs@sourceware.org Subject: [newlib-cygwin] libc/iconv: Detect CES handler loading failure X-Act-Checkin: newlib-cygwin X-Git-Author: Keith Packard via Newlib X-Git-Refname: refs/heads/master X-Git-Oldrev: acfc63b0cf0df472a8e17df1bf5a2c8284e28833 X-Git-Newrev: 6c772f4547c5eea46fb814806509b78f08dfdfa1 Message-Id: <20200710100315.D4C02386F457@sourceware.org> Date: Fri, 10 Jul 2020 10:03:15 +0000 (GMT) X-BeenThere: newlib-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Newlib GIT logs List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Jul 2020 10:03:15 -0000 https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=6c772f4547c5eea46fb814806509b78f08dfdfa1 commit 6c772f4547c5eea46fb814806509b78f08dfdfa1 Author: Keith Packard via Newlib Date: Thu Jul 9 16:58:45 2020 -0700 libc/iconv: Detect CES handler loading failure Fix the code checking for character set loading failure so that it checks the return value from the init function. Signed-off-by: Keith Packard Diff: --- newlib/libc/iconv/ces/euc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/newlib/libc/iconv/ces/euc.c b/newlib/libc/iconv/ces/euc.c index 29d36f941..ebd7091b0 100644 --- a/newlib/libc/iconv/ces/euc.c +++ b/newlib/libc/iconv/ces/euc.c @@ -306,7 +306,7 @@ ok: data->data[i] = _iconv_to_ucs_ces_handlers_table.init ( rptr, data->desc[i].csname); - if (data->data == NULL) + if (data->data[i] == NULL) goto error; }