Fixed Memory Overflow Errors

In function impeg2d_dec_p_b_slice, there was no check for num_mbs_left ==
0 after skip_mbs function call. Hence, even though it should have returned
as an error, it goes ahead to decode the frame and writes beyond the
buffer allocated for output. Put a check for the same.

Bug: 38207066
Test: before/after execution of PoC on angler/nyc-mr2-dev
Change-Id: If4b7bea51032bf2fe2edd03f64a68847aa4f6a00
(cherry picked from commit 2df080153464bf57084d68ba3594e199bc140eb4)
1 file changed