This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Fix a regression bug included by commit e64d2de52.
- From: "Carlos O'Donell" <carlos at systemhalted dot org>
- To: Tulio Magno Quites Machado Filho <tuliom at linux dot vnet dot ibm dot com>
- Cc: libc-alpha at sourceware dot org, davem at redhat dot com, ryan dot arnold at gmail dot com, aj at suse dot com
- Date: Mon, 2 Apr 2012 20:04:59 -0400
- Subject: Re: [PATCH] Fix a regression bug included by commit e64d2de52.
- References: <4F75A34B.201@suse.com><1333383617-16707-1-git-send-email-tuliom@linux.vnet.ibm.com>
On Mon, Apr 2, 2012 at 12:20 PM, Tulio Magno Quites Machado Filho
<tuliom@linux.vnet.ibm.com> wrote:
> Commit e64d2de52 included a bug when converting from TCVN-5712 to UTF8.
> This fixes the bug by properly checking for the end of input strings when
> converting from TCVN-5712 to UCS4.
> I've verified that this commit passes the same make check tests that used
> to pass before e64d2de52 on x86-64.
>
> 2012-04-02 Tulio Magno Quites Machado Filho <tuliom@linux.vnet.ibm.com>
>
> ? ? ? ?[BZ #13691]
> ? ? ? ?* iconvdata/tcvn5712-1.c (FROM_LOOP): Fix a bug when converting
> ? ? ? ?strings ended by characters between 0x0041 and 0x01b0. Also, fix a
> ? ? ? ?regression bug inserted by commit e64d2de52.
> ---
> ?iconvdata/tcvn5712-1.c | ? ?5 +++--
> ?1 files changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/iconvdata/tcvn5712-1.c b/iconvdata/tcvn5712-1.c
> index 09dcbbf..4ec8410 100644
> --- a/iconvdata/tcvn5712-1.c
> +++ b/iconvdata/tcvn5712-1.c
> @@ -378,8 +378,9 @@ static const struct
> ? ? /* Determine whether there is a buffered character pending. ?*/ ? ? ? ? ?\
> ? ? last_ch = *statep >> 3; ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?\
> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?\
> - ? ?/* We have to buffer ch if it is a possible match in comp_table_data. ?*/ \
> - ? ?must_buffer_ch = last_ch && (ch >= 0x0041 && ch <= 0x01b0); ? ? ? ? ? ? ? ? ? ? ?\
> + ? ?/* We have to buffer ch if it is a possible match in comp_table_data ?*/ ?\
> + ? ?/* and if it isn't the last char of the string. ?*/ ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?\
> + ? ?must_buffer_ch = (ch >= 0x0041 && ch <= 0x01b0) && (inptr+1 != inend); ? ?\
A multiline comment should be written:
/* foo
bar. */
The +1 should be written with spaces:
inptr + 1 != inend
OK with those fixes.
Cheers,
Carlos.
Cheers,
Carlos.