Re: [FFmpeg-devel] [PATCH 1/2] avcodec/hapdec: Check tex_size more strictly and before using it

2020-05-09 Thread Michael Niedermayer
On Sun, Apr 05, 2020 at 11:10:44PM +0200, Michael Niedermayer wrote: > Fixes: OOM > Fixes: > 20774/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HAP_fuzzer-5678608951803904 > Fixes: > 20956/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HAP_fuzzer-5713643025203200 > > Found-by:

Re: [FFmpeg-devel] [PATCH 1/2] avcodec/hapdec: Check tex_size more strictly and before using it

2020-03-31 Thread Michael Niedermayer
On Tue, Mar 31, 2020 at 05:45:39PM +0200, Moritz Barsnick wrote: > On Sat, Mar 28, 2020 at 22:12:45 +0100, Michael Niedermayer wrote: > > +if (ctx->tex_size != (avctx->coded_width / TEXTURE_BLOCK_W) > > +*(avctx->coded_height / TEXTURE_BLOCK_H) > > +*tex_rat[t]) {

Re: [FFmpeg-devel] [PATCH 1/2] avcodec/hapdec: Check tex_size more strictly and before using it

2020-03-31 Thread Moritz Barsnick
On Sat, Mar 28, 2020 at 22:12:45 +0100, Michael Niedermayer wrote: > +if (ctx->tex_size != (avctx->coded_width / TEXTURE_BLOCK_W) > +*(avctx->coded_height / TEXTURE_BLOCK_H) > +*tex_rat[t]) { It would be easier to recognize that this is a multiplication and not a