mirror of
https://github.com/taglib/taglib.git
synced 2025-07-21 14:34:23 -04:00
Fix parsing of regular 32-bit integers in SynchData::toUInt()
BUG:231075 git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@1115275 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
This commit is contained in:
@ -46,14 +46,10 @@ TagLib::uint SynchData::toUInt(const ByteVector &data)
|
||||
}
|
||||
|
||||
if(notSynchSafe) {
|
||||
/*
|
||||
* Invalid data; assume this was created by some buggy software that just
|
||||
* put normal integers here rather than syncsafe ones, and try it that
|
||||
* way.
|
||||
*/
|
||||
sum = 0;
|
||||
for(int i = 0; i <= last; i++)
|
||||
sum |= data[i] << ((last - i) * 8);
|
||||
// Invalid data; assume this was created by some buggy software that just
|
||||
// put normal integers here rather than syncsafe ones, and try it that
|
||||
// way.
|
||||
sum = (data.size() > 4) ? data.mid(0, 4).toUInt() : data.toUInt();
|
||||
}
|
||||
|
||||
return sum;
|
||||
|
Reference in New Issue
Block a user