unistr/u8-to-u32: Reject invalid input.
authorBruno Haible <bruno@clisp.org>
Sat, 9 Jan 2010 22:29:05 +0000 (23:29 +0100)
committerIan Beckwith <ianb@erislabs.net>
Sun, 10 Jan 2010 00:54:58 +0000 (00:54 +0000)
(cherry picked from commit 95a86a971a26592ce38fa66c56168707a140d1d3)

ChangeLog
lib/unistr/u8-to-u32.c
modules/unistr/u8-to-u32

index 3f0483f..0374486 100644 (file)
--- 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.
index d1e71c1..de2a35e 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 = u8_mbtouc (&uc, s, s_end - s);
+      count = u8_mbtoucr (&uc, s, s_end - s);
       if (count < 0)
         {
           if (!(result == resultbuf || result == NULL))
index 7b3dcb5..a3d27d9 100644 (file)
@@ -6,7 +6,7 @@ lib/unistr/u8-to-u32.c
 
 Depends-on:
 unistr/base
-unistr/u8-mbtouc
+unistr/u8-mbtoucr
 
 configure.ac: