GNOME Bugzilla – Bug 153583
Too much memory is allocated in shape for dash
Last modified: 2006-11-12 22:16:59 UTC
Too much memory is allocated in shape for dash. Here is the patch to fix it: *** gnome-canvas-shape.c 2004-09-23 21:02:39.047224712 +0200 --- gnome-canvas-shape-orig.c 2004-09-23 21:00:37.291734360 +0200 *************** *** 486,492 **** priv->dash.offset = dash->offset; priv->dash.n_dash = dash->n_dash; if (dash->dash != NULL) { ! priv->dash.dash = g_new (double, dash->n_dash); memcpy (priv->dash.dash, dash->dash, dash->n_dash * sizeof (double)); } } --- 486,492 ---- priv->dash.offset = dash->offset; priv->dash.n_dash = dash->n_dash; if (dash->dash != NULL) { ! priv->dash.dash = g_new (double, dash->n_dash * sizeof (double)); memcpy (priv->dash.dash, dash->dash, dash->n_dash * sizeof (double)); } }
Looks like this was applied already.
Or was the patch reversed?
The patch is reversed. But I don't think we have a test application to be used for dashes. I'm goint to write one.
2006-11-12 Sven Herzberg <herzi@gnome-de.org> * demos/Makefile.am: build dash demo * demos/dash-demo.c: a demo to demonstrate the dash property * libgnomecanvas/gnome-canvas-shape.c: don't allocate too much memory. Closes bug #153583 (Patch from Peter G. Baum)