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

index 8055a731a92f9354c06b89a653441859a5a665d8..f722570dbb6dd4440ce996913fbbaa87f83a5515 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 d1e71c1e0ae714e54cb17d93c3792415b8c50a62..de2a35e6fbd8974808b99336845846e3afd5128f 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 7b3dcb5b661ff20f9f1f07367cc9c654e14ed614..a3d27d9341d25feaaf988baaa4e587fa389596a5 100644 (file)
@@ -6,7 +6,7 @@ lib/unistr/u8-to-u32.c
 
 Depends-on:
 unistr/base
-unistr/u8-mbtouc
+unistr/u8-mbtoucr
 
 configure.ac: