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:

committed by
Gerrit Code Review

parent
2bcc473602
commit
76e0c95dd9
@@ -807,6 +807,10 @@ static void setup_frame_size_with_refs(VP9D_COMP *pbi,
|
|||||||
if (!found)
|
if (!found)
|
||||||
read_frame_size(cm, rb, &width, &height);
|
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);
|
setup_display_size(pbi, rb);
|
||||||
apply_frame_size(pbi, width, height);
|
apply_frame_size(pbi, width, height);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user