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

index f722570dbb6dd4440ce996913fbbaa87f83a5515..5c135c300a6effc341c260fb8aa3d88f039f7c3b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2010-01-09  Bruno Haible  <bruno@clisp.org>
 
+       unistr/u16-to-u8: Reject invalid input.
+       * lib/unistr/u16-to-u8.c (u16_to_u8): Call u16_mbtoucr instead of
+       u16_mbtouc.
+       * modules/unistr/u16-to-u8 (Depends-on): Add unistr/u16-mbtoucr.
+       Remove unistr/u16-mbtouc.
+
        unistr/u8-to-u32: Reject invalid input.
        * lib/unistr/u8-to-u32.c (u8_to_u32): Call u8_mbtoucr instead of
        u8_mbtouc.
index 6d8c3227359062890fc5e63f071a5f742a435900..f92cc9305c39badedd6591cf422c82a9344ff0f0 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 7fc8dba0039ad33a56c8e60439f126c2ee42eba0..a9bd312b2f310cf8ec4f5452c37c15ca15e8af97 100644 (file)
@@ -6,7 +6,7 @@ lib/unistr/u16-to-u8.c
 
 Depends-on:
 unistr/base
-unistr/u16-mbtouc
+unistr/u16-mbtoucr
 unistr/u8-uctomb
 
 configure.ac: