flxdec: Allocate 0-initialized memory for the decoded frame

Otherwise we might leak arbitrary information from the uninitialized
memory if not every pixel is written.

https://scarybeastsecurity.blogspot.gr/2016/12/1days-0days-pocs-more-gstreamer-flic.html
This commit is contained in:
Sebastian Dröge 2016-12-06 07:48:47 +02:00
parent bc2adef550
commit 96aaf889af

View file

@ -812,8 +812,8 @@ gst_flxdec_chain (GstPad * pad, GstObject * parent, GstBuffer * buf)
}
/* create delta and output frame */
flxdec->frame_data = g_malloc (flxdec->size);
flxdec->delta_data = g_malloc (flxdec->size);
flxdec->frame_data = g_malloc0 (flxdec->size);
flxdec->delta_data = g_malloc0 (flxdec->size);
flxdec->state = GST_FLXDEC_PLAYING;
}