Re: [gob-list] Patch for the bug on remove_sep().

From: Jiri Lebl <jirka_at_5z.com>
Date: Wed, 23 Dec 2009 14:03:33 -0600

Sorry for the late reply.

I have applied the patch in git. I'll make a new release soon, thanks.

Jiri

On Mon, Nov 23, 2009 at 10:11 PM, Ding Yi Chen <dchen_at_redhat.com> wrote:
> Hi,
>
> I am using gob2 to develop various projects such as WritRecogn, ibus-chewing, and MakerDialog.
> Recently I found that those project are failed to compile. After investigation, I think the problem
> might reside in remove_sep(), src/util.c.
>
> In remove_sep(), the code that remove ':' is:
>
>        while((p = strchr(s, ':')))
>                strcpy(p, p+1);
>
> However, according to the man page of strcpy:
>   "The strings may not overlap, and the destination string dest must  be
>       large enough to receive the copy."
>
> In fact, this code block produces unexpected results in some systems.
> For example:
>  Ma:Class is converted to Ma:Clsss
>  Ma:Placement is converted to Ma:Plccemnnt
>
> The patch that address this issue is attached.
>
> Regards,
> --
> Ding-Yi Chen
> Software Engineer
> Internationalization Group
> Red Hat, Inc.
>
> Register now for Red Hat Virtual Experience, December 9.
> Enterprise Linux, virtualization, cloud, and more.
> http://www.redhat.com/virtualexperience
>
> --
> to unsubscribe:
> send mail to minimalist_at_5z.com with "unsubscribe gob-list" in the subject
>
>

-- 
Jiri (George) Lebl, http://www.math.uiuc.edu/~jlebl/ or http://www.jirka.org/
It is a miracle that curiosity survives formal education. -- Albert Einstein
Received on Wed Dec 23 2009 - 14:03:43 CST

This archive was generated by hypermail 2.2.0 : Sun Apr 17 2011 - 21:05:02 CDT