Browse files

Fix for Synaesthesia memory corruption

We were allocating just half the required space and consequently
writing beyond the end of the array. This consistently caused
segfaults for me when using the Synaesthesia visualiser.

This fix appears to be consistent with the code used in other projects
which were also derived from the original Synaesthia project.

e.g. GStreamer/Source/gst-plugins-ugly/gst/synaesthesia/synaescope.c
  • Loading branch information...
stuartm committed Jul 21, 2012
1 parent b14564a commit e331017f2d1ee9be82da9c0b64ca4435ec3efd1e
Showing with 2 additions and 2 deletions.
  1. +2 −2 mythplugins/mythmusic/mythmusic/polygon.h
@@ -18,13 +18,13 @@ class Bitmap
delete[] data;
width = w;
height = h;
data = new Pixel[w*h+extra];
data = new Pixel[2*w*h+extra];
void clear()
memset(data,0,sizeof (Pixel)*(2*width*height+extra));

0 comments on commit e331017

Please sign in to comment.