[FFmpeg-devel] [PATCH 2/2] avcodec/wavpack: Prevent frame format from being wrong

David Bryant david at wavpack.com
Fri Mar 20 17:59:12 EET 2020


On 3/20/20 1:54 AM, Paul B Mahol wrote:
> lgtm

Looks good to me too, sorry about that!


>
> On 3/20/20, Michael Niedermayer <michael at niedermayer.cc> wrote:
>> Fixes: out of array access
>> Fixes:
>> 21193/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WAVPACK_fuzzer-5125168956702720
>>
>> 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/wavpack.c | 1 +
>>  1 file changed, 1 insertion(+)
>>
>> diff --git a/libavcodec/wavpack.c b/libavcodec/wavpack.c
>> index b27262b94e..e9c870e41e 100644
>> --- a/libavcodec/wavpack.c
>> +++ b/libavcodec/wavpack.c
>> @@ -1488,6 +1488,7 @@ static int wavpack_decode_block(AVCodecContext *avctx,
>> int block_no,
>>
>>          /* get output buffer */
>>          wc->curr_frame.f->nb_samples = s->samples;
>> +        wc->curr_frame.f->format     = avctx->sample_fmt;
>>          if ((ret = ff_thread_get_buffer(avctx, &wc->curr_frame,
>> AV_GET_BUFFER_FLAG_REF)) < 0)
>>              return ret;
>>
>> --
>> 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".
> _______________________________________________
> 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