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

Thilo Borgmann thilo.borgmann at mail.de
Wed Oct 15 14:36:03 CEST 2014


Am 13.10.14 13:08, schrieb Nicolas George:
> Le duodi 22 vendémiaire, an CCXXIII, Reimar Döffinger a écrit :
>> 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 spec says:
> 
> # Two pointers compare equal if and only if both are null pointers, both are
> # pointers to the same object (including a pointer to an object and a
> # subobject at its beginning) or function, both are pointers to one past the
> # last element of the same array object, or one is a pointer to one past the
> # end of one array object and the other is a pointer to the start of a
> # different array object that happens to immediately follow the first array
> # object in the address space.)
> 
> If I read this correctly, the "and only if" means that comparing pointers
> from different allocations is valid and returns false.
> 
> I suspect you are generalising the issue with < and >: for these operators,
> comparing pointers to different objects is invalid.

Ping. The pointer issue does not apply to the current patch.

-Thilo



More information about the ffmpeg-devel mailing list