mirror of
https://github.com/taglib/taglib.git
synced 2025-06-03 17:18:11 -04:00
Don't die on invalid input.
git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@315934 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
This commit is contained in:
parent
9320aa0bbc
commit
05e484830c
@ -158,6 +158,9 @@ String::String(const ByteVector &v, Type t)
|
||||
{
|
||||
d = new StringPrivate;
|
||||
|
||||
if(v.isEmpty())
|
||||
return;
|
||||
|
||||
if(t == Latin1 || t == UTF8) {
|
||||
|
||||
int length = 0;
|
||||
@ -175,7 +178,7 @@ String::String(const ByteVector &v, Type t)
|
||||
wstring::iterator targetIt = d->data.begin();
|
||||
|
||||
for(ByteVector::ConstIterator it = v.begin();
|
||||
it + 1 != v.end() && combine(*it, *(it + 1));
|
||||
it != v.end() && it + 1 != v.end() && combine(*it, *(it + 1));
|
||||
it += 2)
|
||||
{
|
||||
*targetIt = combine(*it, *(it + 1));
|
||||
|
Loading…
x
Reference in New Issue
Block a user