[FFmpeg-devel] [PATCH] ARMovie/RPL demuxer rev4
Eli Friedman
eli.friedman
Sat Mar 29 02:10:29 CET 2008
On Fri, Mar 28, 2008 at 5:44 PM, Michael Niedermayer <michaelni at gmx.at> wrote:
> >
> > > > + if (offset >= 0xFFFFFFFFUL || video_size >= 0xFFFFFFFFUL ||
> > > > + audio_size >= 0xFFFFFFFFUL)
> > > > + error |= -1;
> > >
> > > What exactly is this check good for?
> >
> > Overflow, so it doesn't silently accept 10000000000000 as an offset.
>
> What is the problem if it does accept 10000000000000 as an offset?
> And why is 0xFFFFFFFEUL different?
>
> [...]
10000000000000 is outside of the range of representable values for a
long, and gets transformed into 0xFFFFFFFFUL, at least on a 32-bit
machine.
-Eli
More information about the ffmpeg-devel
mailing list