From 19aa55eaba476927ff9480bf2277b7ebb5ef9ad2 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sat, 9 Jan 2010 23:30:53 +0100 Subject: [PATCH] unistr/u16-to-u32: Reject invalid input. --- ChangeLog | 6 ++++++ lib/unistr/u16-to-u32.c | 2 +- modules/unistr/u16-to-u32 | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5c135c300a..db1027c96a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2010-01-09 Bruno Haible + unistr/u16-to-u32: Reject invalid input. + * lib/unistr/u16-to-u32.c (u16_to_u32): Call u16_mbtoucr instead of + u16_mbtouc. + * modules/unistr/u16-to-u32 (Depends-on): Add unistr/u16-mbtoucr. + Remove unistr/u16-mbtouc. + unistr/u16-to-u8: Reject invalid input. * lib/unistr/u16-to-u8.c (u16_to_u8): Call u16_mbtoucr instead of u16_mbtouc. diff --git a/lib/unistr/u16-to-u32.c b/lib/unistr/u16-to-u32.c index d79445ba90..3544cde343 100644 --- a/lib/unistr/u16-to-u32.c +++ b/lib/unistr/u16-to-u32.c @@ -58,7 +58,7 @@ FUNC (const SRC_UNIT *s, size_t n, DST_UNIT *resultbuf, size_t *lengthp) int count; /* Fetch a Unicode character from the input string. */ - count = u16_mbtouc (&uc, s, s_end - s); + count = u16_mbtoucr (&uc, s, s_end - s); if (count < 0) { if (!(result == resultbuf || result == NULL)) diff --git a/modules/unistr/u16-to-u32 b/modules/unistr/u16-to-u32 index 399ac89de6..bb2e4885d7 100644 --- a/modules/unistr/u16-to-u32 +++ b/modules/unistr/u16-to-u32 @@ -6,7 +6,7 @@ lib/unistr/u16-to-u32.c Depends-on: unistr/base -unistr/u16-mbtouc +unistr/u16-mbtoucr configure.ac: -- 2.30.2