[FFmpeg-devel] [PATCH 1/2] avcodec/mobiclip: check for pmode=2 ax/ay=0
Paul B Mahol
onemda at gmail.com
Sat Sep 12 17:49:58 EEST 2020
On Sat, Sep 12, 2020 at 04:35:54PM +0200, Michael Niedermayer wrote:
> Fixes: out of array access
> Fixes: 25452/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MOBICLIP_fuzzer-5081657055641600
>
> Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
> Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> ---
> libavcodec/mobiclip.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/libavcodec/mobiclip.c b/libavcodec/mobiclip.c
> index 13f0edc89d..3ede370bef 100644
> --- a/libavcodec/mobiclip.c
> +++ b/libavcodec/mobiclip.c
> @@ -914,6 +914,9 @@ static int predict_intra(AVCodecContext *avctx, AVFrame *frame, int ax, int ay,
> int shift = adjust(size, size) == 8 ? 3 : 2;
> uint8_t *block;
>
> + if (ax == 0 && ay == 0)
> + return -1;
> +
Please clip it instead, FFMAX(ax - 1, 0) above.
I forgot to do it.
> for (int x = 0; x < size; x++) {
> int val = top[x];
> arr1[x] = adjust(((bottommost - val) * (1 << shift)) + r6 * (x + 1), size);
> --
> 2.17.1
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".
More information about the ffmpeg-devel
mailing list