On Fri, Nov 7, 2014 at 6:07 PM, Luca Barbato <[email protected]> wrote:
> On 04/11/14 15:36, Vittorio Giovara wrote:
>>
>> From: Michael Niedermayer <[email protected]>
>>
>> CC: [email protected]
>> Bug-Id: CID 1047236
>> ---
>>   libavcodec/mpeg12enc.c | 4 ++--
>>   1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/libavcodec/mpeg12enc.c b/libavcodec/mpeg12enc.c
>> index 96130ea..5fc5e36 100644
>> --- a/libavcodec/mpeg12enc.c
>> +++ b/libavcodec/mpeg12enc.c
>> @@ -658,7 +658,7 @@ next_coef:
>>   }
>>
>>   static av_always_inline void mpeg1_encode_mb_internal(MpegEncContext *s,
>> -                                                      int16_t
>> block[6][64],
>> +                                                      int16_t
>> block[8][64],
>>                                                         int motion_x, int
>> motion_y,
>>                                                         int
>> mb_block_count)
>>   {
>> @@ -935,7 +935,7 @@ static av_always_inline void
>> mpeg1_encode_mb_internal(MpegEncContext *s,
>>       }
>>   }
>>
>> -void ff_mpeg1_encode_mb(MpegEncContext *s, int16_t block[6][64],
>> +void ff_mpeg1_encode_mb(MpegEncContext *s, int16_t block[8][64],
>>                           int motion_x, int motion_y)
>>   {
>>       if (s->chroma_format == CHROMA_420)
>>
>
> Ok if 8 is the value we should use.

I think so, at least it's what is used for non 420,
"mpeg1_encode_mb_internal(s, block, motion_x, motion_y, 8);",
otherwise it returns:

CID 1047236 (#1 of 1): Out-of-bounds access (OVERRUN)2.
overrun-buffer-arg: Overrunning buffer pointed to by block of 6
128-byte elements by passing it to a function which accesses it at
element index 7 (byte offset 896) using argument 8. [show details]

I noticed that this does not update the header, I'll amend this locally.
-- 
Vittorio
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to