From: Jean-Paul Saman Date: Wed, 2 Jan 2008 13:01:12 +0000 (+0000) Subject: Fix signed int, unsigned int comparison. X-Git-Tag: 0.9.0-test0~3718 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=7a5570ddfbedf8304c56847d8cfd1d88d0b85e17;p=vlc Fix signed int, unsigned int comparison. --- diff --git a/modules/demux/live555.cpp b/modules/demux/live555.cpp index 7ab9e9486a..20f46061f0 100644 --- a/modules/demux/live555.cpp +++ b/modules/demux/live555.cpp @@ -1516,8 +1516,8 @@ static void StreamRead( void *p_private, unsigned int i_size, uint8_t *endpos = (uint8_t*)qtRTPSource->qtState.sdAtom + qtRTPSource->qtState.sdAtomSize; while (pos+8 < endpos) { - unsigned atomLength = pos[0]<<24 | pos[1]<<16 | pos[2]<<8 | pos[3]; - if( atomLength == 0 || atomLength > endpos-pos) break; + unsigned int atomLength = pos[0]<<24 | pos[1]<<16 | pos[2]<<8 | pos[3]; + if( atomLength == 0 || atomLength > (unsigned int)(endpos-pos)) break; if( memcmp(pos+4, "avcC", 4) == 0 && atomLength > 8 && atomLength <= INT_MAX )