From cbf4d8dacb7ce21b3c45a495f7ded7f46c6d2c10 Mon Sep 17 00:00:00 2001 From: Stuart Morgan Date: Wed, 25 Jul 2012 18:17:32 +0100 Subject: [PATCH] Fix for Synaesthesia memory corruption and segfault --- mythplugins/mythmusic/mythmusic/polygon.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mythplugins/mythmusic/mythmusic/polygon.h b/mythplugins/mythmusic/mythmusic/polygon.h index aec8a1dec1c..7f365c816b2 100644 --- a/mythplugins/mythmusic/mythmusic/polygon.h +++ b/mythplugins/mythmusic/mythmusic/polygon.h @@ -15,12 +15,12 @@ struct Bitmap { delete[] data; width = w; height = h; - data = new Pixel[w*h+extra]; + data = new Pixel[2*w*h+extra]; clear(); } void clear() { - memset(data,0,sizeof(Pixel)*(width*height+extra)); + memset(data,0,sizeof(Pixel)*(2*width*height+extra)); } }; #endif