]> git.sesse.net Git - vlc/commitdiff
Fix signed int, unsigned int comparison.
authorJean-Paul Saman <jpsaman@videolan.org>
Wed, 2 Jan 2008 13:01:12 +0000 (13:01 +0000)
committerJean-Paul Saman <jpsaman@videolan.org>
Wed, 2 Jan 2008 13:01:12 +0000 (13:01 +0000)
modules/demux/live555.cpp

index 7ab9e9486a4ef4db25a80bb37e763135147012ec..20f46061f046523afd78c3508f31f3d503cef7e6 100644 (file)
@@ -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 )