Merge the 2019-01-01 SPL branch from AOSP-Partner
* security-aosp-nyc-mr2-release:
libwebm: Cherrypick 5a41830 from upstream
Change-Id: I7a2edb48eb80c9ba4f5591a689da833a8afbf59e
diff --git a/libvpx/vp8/vp8_dx_iface.c b/libvpx/vp8/vp8_dx_iface.c
index a12a2ad..dfd05a1 100644
--- a/libvpx/vp8/vp8_dx_iface.c
+++ b/libvpx/vp8/vp8_dx_iface.c
@@ -185,8 +185,8 @@
si->h = (clear[8] | (clear[9] << 8)) & 0x3fff;
/*printf("w=%d, h=%d\n", si->w, si->h);*/
- if (!(si->h | si->w))
- res = VPX_CODEC_UNSUP_BITSTREAM;
+ if (!(si->h && si->w))
+ res = VPX_CODEC_CORRUPT_FRAME;
}
else
{
@@ -408,6 +408,10 @@
if (setjmp(pbi->common.error.jmp))
{
pbi->common.error.setjmp = 0;
+ /* on failure clear the cached resolution to ensure a full
+ * reallocation is attempted on resync. */
+ ctx->si.w = 0;
+ ctx->si.h = 0;
vp8_clear_system_state();
/* same return value as used in vp8dx_receive_compressed_data */
return -1;