mirror of
https://github.com/taglib/taglib.git
synced 2025-06-04 01:28:21 -04:00
Don't overrun the buffer if the first byte is 0xff
git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@553365 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
This commit is contained in:
parent
a6aeaef64e
commit
3856f38655
@ -452,7 +452,7 @@ long MPEG::File::nextFrameOffset(long position)
|
||||
seek(position);
|
||||
buffer = readBlock(bufferSize());
|
||||
|
||||
for(uint i = 0; i < buffer.size(); i++) {
|
||||
for(uint i = 0; i < buffer.size() - 1; i++) {
|
||||
if(uchar(buffer[i]) == 0xff && secondSynchByte(buffer[i + 1]))
|
||||
return position + i;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user