Re: Patch for the bug on remove_sep().

Jiri Lebl <[email protected]> Wed, 23 Dec 2009 14:03:33 -0600
Newsgroups gmane.comp.gnome.devtools.gob.general
Message-ID <[email protected]>
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 <[email protected]> wrote:
> Hi,
>
> I am using gob2 to develop various projects such as WritRecogn, ibus-ch=
ewing, and MakerDialog.
> Recently I found that those project are failed to compile. After invest=
igation, I think the problem
> might reside in remove_sep(), src/util.c.
>
> In remove_sep(), the code that remove ':' is:
>
> =A0 =A0 =A0 =A0while((p =3D strchr(s, ':')))
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0strcpy(p, p+1);
>
> However, according to the man page of strcpy:
> =A0 "The strings may not overlap, and the destination string dest must =
=A0be
> =A0 =A0 =A0 large enough to receive the copy."
>
> In fact, this code block produces unexpected results in some systems.
> For example:
> =A0Ma:Class is converted to Ma:Clsss
> =A0Ma: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 [email protected] with "unsubscribe gob-list" in the subje=
ct
>
>



--=20
Jiri (George) Lebl, http://www.math.uiuc.edu/~jlebl/ or http://www.jirka.=
org/
It is a miracle that curiosity survives formal education. -- Albert Einst=
ein



--
to unsubscribe:
send mail to [email protected] with "unsubscribe gob-list" in the subject