diff options
author | Keith Packard via Newlib <newlib@sourceware.org> | 2020-07-09 16:58:45 -0700 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2020-07-10 10:51:43 +0200 |
commit | 6c772f4547c5eea46fb814806509b78f08dfdfa1 (patch) | |
tree | ebe685286efd0ffd7b03fb4dc71d9e2978c04085 /newlib | |
parent | acfc63b0cf0df472a8e17df1bf5a2c8284e28833 (diff) | |
download | newlib-6c772f4547c5eea46fb814806509b78f08dfdfa1.zip newlib-6c772f4547c5eea46fb814806509b78f08dfdfa1.tar.gz newlib-6c772f4547c5eea46fb814806509b78f08dfdfa1.tar.bz2 |
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 <keithp@keithp.com>
Diffstat (limited to 'newlib')
-rw-r--r-- | newlib/libc/iconv/ces/euc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/newlib/libc/iconv/ces/euc.c b/newlib/libc/iconv/ces/euc.c index 29d36f9..ebd7091 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; } |