diff options
author | Chris Robinson <[email protected]> | 2010-11-27 22:22:14 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2010-11-27 22:22:14 -0800 |
commit | b4eaf1ab5a675ff0d75fbec2239fb0ce44d3e06c (patch) | |
tree | 49b2fdc1074bbd09deca6f9cd88ccdc4c80e05da /OpenAL32/alSource.c | |
parent | 3c8e9a7f2411789dc56b7ac11d24a2ea30be1cde (diff) |
Avoid a potential overflow when setting the source offset
Diffstat (limited to 'OpenAL32/alSource.c')
-rw-r--r-- | OpenAL32/alSource.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/OpenAL32/alSource.c b/OpenAL32/alSource.c index 1cb8b78e..8cd1d4a1 100644 --- a/OpenAL32/alSource.c +++ b/OpenAL32/alSource.c @@ -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++; |