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

index 942adf6000f507c02b87b6f50664f9352cd5468e..8055a731a92f9354c06b89a653441859a5a665d8 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2010-01-09  Bruno Haible  <bruno@clisp.org>
+
+       unistr/u8-to-u16: Reject invalid input.
+       * lib/unistr/u8-to-u16.c (u8_to_u16): Call u8_mbtoucr instead of
+       u8_mbtouc.
+       * modules/unistr/u8-to-u16 (Depends-on): Add unistr/u8-mbtoucr.
+       Remove unistr/u8-mbtouc.
+
 2010-01-09  Bruno Haible  <bruno@clisp.org>
 
        Tests for module 'getlogin'.
index 6dac1b72ca99708e77b5df4768a5354e5cc0ac21..3745c2bdd889c1d36b81427d291a3f319a4b5396 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 79dfb44bde3844eee31ef764cebbcbba1864b988..d87a81141fee38a508fd05281a3c94a0c90bef10 100644 (file)
@@ -6,7 +6,7 @@ lib/unistr/u8-to-u16.c
 
 Depends-on:
 unistr/base
-unistr/u8-mbtouc
+unistr/u8-mbtoucr
 unistr/u16-uctomb
 
 configure.ac: