Avoid a potential overflow when setting the source offset
This commit is contained in:
+1
-1
@@ -1949,7 +1949,7 @@ static ALboolean ApplyOffset(ALsource *Source)
|
||||
Buffer = BufferList->buffer;
|
||||
lBufferSize = Buffer ? Buffer->size : 0;
|
||||
|
||||
if(lTotalBufferSize+lBufferSize <= lByteOffset)
|
||||
if(lBufferSize <= lByteOffset-lTotalBufferSize)
|
||||
{
|
||||
// Offset is past this buffer so increment BuffersPlayed
|
||||
BuffersPlayed++;
|
||||
|
||||
Reference in New Issue
Block a user