From: Andreas F. <an...@fa...> - 2013-08-13 15:26:27
|
Hi, in the override function for wxImage::SetAlpha() in wxcore_override.hpp there is the following code: size_t size = 3*self->GetWidth()*self->GetHeight(); memcpy(self->GetData(), data, wxMin(len, size)); I think this is wrong because alpha channel data is only one byte per pixel. Thus, the code above is likely to crash if the user calls SetAlphaData() with a string containing more than width*height bytes. Instead, it should be: size_t size = self->GetWidth()*self->GetHeight(); memcpy(self->GetData(), data, wxMin(len, size)); -- Best regards, Andreas Falkenhahn mailto:an...@fa... |