[FFmpeg-devel] [PATCH] lavf/mov.c: Allocate buffer in case of long metadata entries.

Thilo Borgmann thilo.borgmann at mail.de
Mon Oct 13 10:08:40 CEST 2014


Am 13.10.14 09:57, schrieb Reimar Döffinger:
> On 11.10.2014, at 16:19, Nicolas George <george at nsup.org> wrote:
>>> +        if (str_size > sizeof(str)-1) { // free buffer for long data field
>>> +            av_freep(&pstr);
>>
>> I think "if (pstr != str)" would be more robust.
> 
> Uh, wouldn't that be undefined behaviour?
> You're not allowed to compare pointers from different allocations as far as I know, even if it usually works.

The original comparison is still in the patch and no pointers are compared.
Which does not mean I'm sure about the comparing issue you mention.

-Thilo



More information about the ffmpeg-devel mailing list