Merge the 2019-08-01 SPL branch from AOSP-Partner
* security-aosp-nyc-mr2-release:
Fixes a double free in ContentEncoding
Check there is only one settings per ContentCompression
Change-Id: Ie6c576b0d7a31c6599cfda4ca717bc7c41d083cc
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;