[MPlayer-dev-eng] [PATCH] fix a few warnings
Dominik 'Rathann' Mierzejewski
dominik at rangers.eu.org
Tue Feb 6 00:46:56 CET 2007
On Thursday, 25 January 2007 at 11:48, Reimar Döffinger wrote:
> Hello,
> On Thu, Jan 25, 2007 at 04:57:49AM +0100, Dominik 'Rathann' Mierzejewski wrote:
> > Found this rotting in my patch queue.
> >
> > One weird thing, though:
> >
> > libmpdemux/demux_mov.c:
> > @@ -1369,7 +1369,7 @@
> > z_stream zstrm;
> > stream_t* backup;
> >
> > - if (moov_sz > SIZE_MAX - 16) {
> > + if (moov_sz > INT_MAX - 16) {
> > mp_msg(MSGT_DEMUX, MSGL_ERR, "Invalid cmvd atom size %d\n", moov_sz);
> > break;
> > }
> >
> > With SIZE_MAX, I get "condition always false" or something like that.
>
> IMO the former one is correct. Though this condition really is always
> false on 64 bit systems. Changing the type of moov_sz from "unsigned
> int" to size_t might be an acceptable workaround though if desired.
> No obvious problems with the rest.
Applied except that one.
--
MPlayer developer and RPMs maintainer: http://mplayerhq.hu http://rpm.livna.org
There should be a science of discontent. People need hard times and
oppression to develop psychic muscles.
-- from "Collected Sayings of Muad'Dib" by the Princess Irulan
More information about the MPlayer-dev-eng
mailing list