[LIBART] Re: fix for art_uta_from_vpath



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 
                   alexl redhat com    alla lysator liu se 
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! 




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]