Solves overreading/writing the given arrays and will error out if the
streams asks to do that.
Also does more error checking that the stream is valid and won't
overrun any allocated arrays. Also mitigate integer overflow errors
calculating allocation sizes.
https://bugzilla.gnome.org/show_bug.cgi?id=774859
Original commit message from CVS:
* gst/flx/flx_color.h:
* gst/flx/flx_fmt.h:
* gst/flx/gstflxdec.c: (gst_flxdec_init),
(gst_flxdec_src_query_handler), (flx_decode_color),
(gst_flxdec_chain):
* gst/flx/gstflxdec.h:
Set MALLOCDATA for the temp buffers so we don't leak.
Some debug cleanups.
Consume all data in the adapter before leaving the chain
function. Fixes#330678.