mirror of
https://github.com/taglib/taglib.git
synced 2025-05-27 21:20:26 -04:00
Avoid uint overflow in case the length + index is over UINT_MAX
This commit is contained in:
parent
258ae751b5
commit
110cac8429
@ -363,7 +363,7 @@ ByteVector ByteVector::mid(uint index, uint length) const
|
||||
|
||||
ConstIterator endIt;
|
||||
|
||||
if(length < 0xffffffff && length + index < size())
|
||||
if(length < size() - index)
|
||||
endIt = d->data.begin() + index + length;
|
||||
else
|
||||
endIt = d->data.end();
|
||||
|
Loading…
Reference in New Issue
Block a user