From 7a5570ddfbedf8304c56847d8cfd1d88d0b85e17 Mon Sep 17 00:00:00 2001 From: Jean-Paul Saman Date: Wed, 2 Jan 2008 13:01:12 +0000 Subject: [PATCH] Fix signed int, unsigned int comparison. --- modules/demux/live555.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 ) -- 2.39.2