Trap reference frames of invalid size

A corrupt bitstream could refer to a reference frame that has no size.

Change-Id: I56c3b71a9dbb58b498e9969403e289c0e574f948
This commit is contained in:
John Koleszar 2013-06-11 14:24:53 -07:00 committed by Gerrit Code Review
parent 2bcc473602
commit 76e0c95dd9

View File

@ -807,6 +807,10 @@ static void setup_frame_size_with_refs(VP9D_COMP *pbi,
if (!found)
read_frame_size(cm, rb, &width, &height);
if (!width || !height)
vpx_internal_error(&cm->error, VPX_CODEC_CORRUPT_FRAME,
"Referenced frame with invalid size");
setup_display_size(pbi, rb);
apply_frame_size(pbi, width, height);
}