From: Bruno Haible Date: Sat, 9 Jan 2010 22:29:05 +0000 (+0100) Subject: unistr/u8-to-u32: Reject invalid input. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=95a86a971a26592ce38fa66c56168707a140d1d3;p=pspp unistr/u8-to-u32: Reject invalid input. --- diff --git a/ChangeLog b/ChangeLog index 8055a731a9..f722570dbb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2010-01-09 Bruno Haible + unistr/u8-to-u32: Reject invalid input. + * lib/unistr/u8-to-u32.c (u8_to_u32): Call u8_mbtoucr instead of + u8_mbtouc. + * modules/unistr/u8-to-u32 (Depends-on): Add unistr/u8-mbtoucr. + Remove unistr/u8-mbtouc. + unistr/u8-to-u16: Reject invalid input. * lib/unistr/u8-to-u16.c (u8_to_u16): Call u8_mbtoucr instead of u8_mbtouc. diff --git a/lib/unistr/u8-to-u32.c b/lib/unistr/u8-to-u32.c index d1e71c1e0a..de2a35e6fb 100644 --- a/lib/unistr/u8-to-u32.c +++ b/lib/unistr/u8-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 = u8_mbtouc (&uc, s, s_end - s); + count = u8_mbtoucr (&uc, s, s_end - s); if (count < 0) { if (!(result == resultbuf || result == NULL)) diff --git a/modules/unistr/u8-to-u32 b/modules/unistr/u8-to-u32 index 7b3dcb5b66..a3d27d9341 100644 --- a/modules/unistr/u8-to-u32 +++ b/modules/unistr/u8-to-u32 @@ -6,7 +6,7 @@ lib/unistr/u8-to-u32.c Depends-on: unistr/base -unistr/u8-mbtouc +unistr/u8-mbtoucr configure.ac: