[PATCH 2/6] libc/iconv: Check ces handlers table value in euc_from_ucs_init
Keith Packard
keithp@keithp.com
Thu Aug 20 22:14:45 GMT 2020
Need to check the value returned from
_iconv_from_ucs_ces_handlers_table.init -- the test was
incorrectly comparing the array holding the value.
Signed-off-by: Keith Packard <keithp@keithp.com>
---
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 ebd7091b0..56c0c6a6c 100644
--- a/newlib/libc/iconv/ces/euc.c
+++ b/newlib/libc/iconv/ces/euc.c
@@ -149,7 +149,7 @@ ok:
data->data[i] = _iconv_from_ucs_ces_handlers_table.init (
rptr,
data->desc[i].csname);
- if (data->data == NULL)
+ if (data->data[i] == NULL)
goto error;
}
--
2.28.0
More information about the Newlib
mailing list