fix for art_uta_from_vpath
"Pierre Arnaud" <[email protected]> Wed, 16 Apr 2003 17:04:18 +0200
| Newsgroups | gmane.comp.gnome.lib.libart.general |
|---|---|
| Organization | OPaC bright ideas |
| Message-ID | <016f01c30429$744009f0$2201a8c0@BIGDELL> |
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...
Pierre