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

Reimar Döffinger Reimar.Doeffinger at gmx.de
Mon Oct 13 09:57:35 CEST 2014

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.

More information about the ffmpeg-devel mailing list