[FFmpeg-cvslog] r12253 - trunk/libavformat/matroskaenc.c

Uoti Urpala uoti.urpala
Tue Feb 26 23:43:22 CET 2008


On Tue, 2008-02-26 at 23:35 +0100, aurel wrote:
> Avoid infinite loop.
> uint64_t >> 64 is an undefined operation

> -    while (val >> bytes*8) bytes++;
> +    while (val >> bytes*8 && bytes < 8) bytes++;

Wouldn't it make more sense to write the tests in the opposite order, to
avoid invoking undefined behavior?





More information about the ffmpeg-cvslog mailing list