mmal/codec: Check picture buffer size before usage
mmal/codec: Check picture buffer size before usage

We need to make sure that a buffer is big enough to store the amount of data
we expect to receive from the decoder. Without doing this memory could be
corrupted due to the decoder writing outside the allocate memory.

Signed-off-by: Julian Scheel <354106e416911844661e1603d99ecf7d1c318dda@jusst.de>
Signed-off-by: Jean-Baptiste Kempf <7b85a41a628204b76aba4326273a3ccc74bd009a@videolan.org>

krichter722/vlc,vlc-mirror/vlc,krichter722/vlc,krichter722/vlc,shyamalschandra/vlc,vlc-mirror/vlc,krichter722/vlc,xkfz007/vlc,xkfz007/vlc,krichter722/vlc,xkfz007/vlc,shyamalschandra/vlc,vlc-mirror/vlc,shyamalschandra/vlc,vlc-mirror/vlc,shyamalschandra/vlc,vlc-mirror/vlc,vlc-mirror/vlc,xkfz007/vlc,xkfz007/vlc,krichter722/vlc,krichter722/vlc,shyamalschandra/vlc,shyamalschandra/vlc,shyamalschandra/vlc,vlc-mirror/vlc,xkfz007/vlc,xkfz007/vlc