On Sat, Mar 1, 2014 at 11:18 PM, Vittorio Giovara
<[email protected]> wrote:
> On Sat, Mar 1, 2014 at 8:17 PM, Keiji Costantini <[email protected]> wrote:
>> avoid division by 0 at ff_mpeg4_set_one_direct_mv
>>
>> Sample-Id: 00000168-google
>> Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
>> CC: [email protected]
>> ---
>>  libavcodec/ituh263dec.c | 2 ++
>>  1 file changed, 2 insertions(+)
>>
>> diff --git a/libavcodec/ituh263dec.c b/libavcodec/ituh263dec.c
>> index e365210..48e860f 100644
>> --- a/libavcodec/ituh263dec.c
>> +++ b/libavcodec/ituh263dec.c
>> @@ -750,6 +750,8 @@ int ff_h263_decode_mb(MpegEncContext *s,
>>          }
>>
>>          if(IS_DIRECT(mb_type)){
>> +            if (!s->pp_time )
>> +                return AVERROR_INVALIDDATA;
>>              s->mv_dir = MV_DIR_FORWARD | MV_DIR_BACKWARD | MV_DIRECT;
>>              mb_type |= ff_mpeg4_set_direct_mv(s, 0, 0);
>>          }else{
>
> Looks ok, pushing with a minor nit.
> Vittorio

BTW maybe it'd be correct to have this kind of check in
mpegvideo_enc.c too, although not sure if it's overkill.
Vittorio
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to