unistr/u16-to-u32: Reject invalid input.
authorBruno Haible <bruno@clisp.org>
Sat, 9 Jan 2010 22:30:53 +0000 (23:30 +0100)
committerBruno Haible <bruno@clisp.org>
Sat, 9 Jan 2010 22:30:53 +0000 (23:30 +0100)
ChangeLog
lib/unistr/u16-to-u32.c
modules/unistr/u16-to-u32

index 5c135c300a6effc341c260fb8aa3d88f039f7c3b..db1027c96a1c57525f42c8d46ea31652710aae9e 100644 (file)
--- 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.
index d79445ba90fe9c270a9f3a5ff4aa0d3347477ccb..3544cde34333e498e98496116302f16af62a7dc7 100644 (file)
@@ -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))
index 399ac89de67949b5ed1ae9f195d852613b73c48c..bb2e4885d7b8f23daa2249cdc3c3ce463864ca70 100644 (file)
@@ -6,7 +6,7 @@ lib/unistr/u16-to-u32.c
 
 Depends-on:
 unistr/base
-unistr/u16-mbtouc
+unistr/u16-mbtoucr
 
 configure.ac: