Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Avoid uint overflow in case the length + index is over UINT_MAX

  • Loading branch information...
commit dcdf4fd954e3213c355746fa15b7480461972308 1 parent ab8a0ee
@lalinsky lalinsky authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  taglib/toolkit/tbytevector.cpp
View
2  taglib/toolkit/tbytevector.cpp
@@ -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();
Please sign in to comment.
Something went wrong with that request. Please try again.