diff options
author | Yaowu Xu <yaowu@google.com> | 2015-01-05 10:49:06 -0800 |
---|---|---|
committer | Yaowu Xu <yaowu@google.com> | 2015-01-05 17:19:32 -0800 |
commit | 4fcf726a0e32928e85a46f4dac534524a19bdc39 (patch) | |
tree | 0bd339c361ac7d84d2ac89d7feede77b1995ee36 | |
parent | 2fe1bfa5ade46b7f9f3505801071493a7afd4ad0 (diff) | |
download | libvpx-4fcf726a0e32928e85a46f4dac534524a19bdc39.tar libvpx-4fcf726a0e32928e85a46f4dac534524a19bdc39.tar.gz libvpx-4fcf726a0e32928e85a46f4dac534524a19bdc39.tar.bz2 libvpx-4fcf726a0e32928e85a46f4dac534524a19bdc39.zip |
Return error on wrong sync code
Not initialize codec stream info
This fixes vp8 fuzzing issue reported at build #56
Change-Id: I307ac839b4f4bda3a02a551019c0d688dba19c86
-rw-r--r-- | vp8/vp8_dx_iface.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/vp8/vp8_dx_iface.c b/vp8/vp8_dx_iface.c index 6810644ba..67a0fef64 100644 --- a/vp8/vp8_dx_iface.c +++ b/vp8/vp8_dx_iface.c @@ -188,7 +188,7 @@ static vpx_codec_err_t vp8_peek_si_internal(const uint8_t *data, /* vet via sync code */ if (clear[3] != 0x9d || clear[4] != 0x01 || clear[5] != 0x2a) - res = VPX_CODEC_UNSUP_BITSTREAM; + return VPX_CODEC_UNSUP_BITSTREAM; si->w = (clear[6] | (clear[7] << 8)) & 0x3fff; si->h = (clear[8] | (clear[9] << 8)) & 0x3fff; @@ -402,7 +402,7 @@ static vpx_codec_err_t vp8_decode(vpx_codec_alg_priv_t *ctx, if (!res) { VP8D_COMP *pbi = ctx->yv12_frame_buffers.pbi[0]; - if(resolution_change) + if (resolution_change) { VP8_COMMON *const pc = & pbi->common; MACROBLOCKD *const xd = & pbi->mb; |