# HG changeset patch # User Bruno Haible # Date 1263076220 -3600 # Node ID 1e73a8b85e033a6f55164367177f9de370f93432 # Parent 304d3cda1a9e43f3a5940db2dc710a936e9ad174 unistr/u16-to-u8: Reject invalid input. diff --git a/ChangeLog b/ChangeLog --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2010-01-09 Bruno Haible + 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. diff --git a/lib/unistr/u16-to-u8.c b/lib/unistr/u16-to-u8.c --- a/lib/unistr/u16-to-u8.c +++ b/lib/unistr/u16-to-u8.c @@ -58,7 +58,7 @@ 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)) diff --git a/modules/unistr/u16-to-u8 b/modules/unistr/u16-to-u8 --- a/modules/unistr/u16-to-u8 +++ b/modules/unistr/u16-to-u8 @@ -6,7 +6,7 @@ Depends-on: unistr/base -unistr/u16-mbtouc +unistr/u16-mbtoucr unistr/u8-uctomb configure.ac: