changeset 12618:18bd3340d5ae

unistr/u16-to-u32: Reject invalid input.
author Bruno Haible <bruno@clisp.org>
date Sat, 09 Jan 2010 23:30:53 +0100
parents 1e73a8b85e03
children a6cdcb818fec
files ChangeLog lib/unistr/u16-to-u32.c modules/unistr/u16-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/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.
--- a/lib/unistr/u16-to-u32.c
+++ b/lib/unistr/u16-to-u32.c
@@ -58,7 +58,7 @@
       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))
--- a/modules/unistr/u16-to-u32
+++ b/modules/unistr/u16-to-u32
@@ -6,7 +6,7 @@
 
 Depends-on:
 unistr/base
-unistr/u16-mbtouc
+unistr/u16-mbtoucr
 
 configure.ac: