changeset 12616:304d3cda1a9e

unistr/u8-to-u32: Reject invalid input.
author Bruno Haible <bruno@clisp.org>
date Sat, 09 Jan 2010 23:29:05 +0100
parents aa6136434785
children 1e73a8b85e03
files ChangeLog lib/unistr/u8-to-u32.c modules/unistr/u8-to-u32
diffstat 3 files changed, 8 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2010-01-09  Bruno Haible  <bruno@clisp.org>
 
+	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.
--- a/lib/unistr/u8-to-u32.c
+++ b/lib/unistr/u8-to-u32.c
@@ -58,7 +58,7 @@
       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))
--- a/modules/unistr/u8-to-u32
+++ b/modules/unistr/u8-to-u32
@@ -6,7 +6,7 @@
 
 Depends-on:
 unistr/base
-unistr/u8-mbtouc
+unistr/u8-mbtoucr
 
 configure.ac: