Re: fix for art_uta_from_vpath
Alexander Larsson <[email protected]> Thu, 24 Apr 2003 09:39:41 -0400 (EDT)
| Newsgroups | gmane.comp.gnome.lib.libart.general |
|---|---|
| Message-ID | <Pine.LNX.4.44.0304240939280.15583-100000@devserv.devel.redhat.com> |
On Wed, 16 Apr 2003, Pierre Arnaud wrote:
> Hello,
>
> I think that art_uta_from_vpath should be modified to be more fail safe,
> in case someone calls the function with an open ArtVpath, instead of a
> closed path. Currently, calling art_uta_from_vpath with just a plain
> segment (MOVETO_OPEN A, LINETO B, END) can trash the memory.
>
> Here is my suggestion (art_uta_vpath.c, function art_uta_from_vpath).
> Replace :
>
> default:
> /* this shouldn't happen */
> break;
>
> with :
>
> default:
> /* this shouldn't happen */
> art_free (rbuf);
> art_free (uta);
> return 0;
>
> This avoids that dammage is done on the memory...
Thanks. I put this in cvs.
--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Alexander Larsson Red Hat, Inc
[email protected] [email protected]
He's a time-tossed sweet-toothed waffle chef on the hunt for the last specimen
of a great and near-mythical creature. She's a pregnant nymphomaniac stripper
who can talk to animals. They fight crime!