Buffer overflow
Status: Beta
Brought to you by:
krechert
ScreenVideo *newScreenVideo(int width, int height, int
blockSize) {
imageSize = sizeof\(struct BGR\) \* width \* height;
video->image = \(struct BGR \*\)malloc\(imageSize\);
memset\(video->image, 0, imageSize\);
video->framebuf = \(unsigned char \*\)malloc\(imageSize \*
1.5);
I think that memset function should clear
video->framebuf buffer instead video->image.
memset\(video->image, 0, imageSize \* 1.5\);
video->frameSize = 0;
return video;
}