[FFmpeg-devel] [PATCH 3/3] ffmdec: change type of len to ptrdiff_t
Andreas Cadhalpun
andreas.cadhalpun at googlemail.com
Mon Jan 11 23:18:53 CET 2016
On 07.01.2016 04:12, Michael Niedermayer wrote:
> On Sat, Jan 02, 2016 at 04:52:25PM +0100, Andreas Cadhalpun wrote:
>> It is used to store the difference between pointers, so ptrdiff_t is the
>> correct type.
>>
>> This prevents potential overflows.
>>
>> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun at googlemail.com>
>> ---
>> libavformat/ffmdec.c | 5 +++--
>> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> I think if these pointers can differ by more than te int range then
> theres someting else wrong and changing one variable to ptrdiff_t
> might be insufficient to support that
That's right.
> that said, it should do no harm if you feel that changing these 2
> would make the code more robust
OK, pushed it now.
Best regards,
Andreas
More information about the ffmpeg-devel
mailing list