mirror of
https://github.com/taglib/taglib.git
synced 2025-06-04 01:28:21 -04:00
One more check for invalid frame in AttachedPictureFrame::parseFields
Patch by Mook BUG:168382 git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@994361 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
This commit is contained in:
parent
b70e3b2304
commit
c92a02b0d7
@ -136,6 +136,12 @@ void AttachedPictureFrame::parseFields(const ByteVector &data)
|
||||
int pos = 1;
|
||||
|
||||
d->mimeType = readStringField(data, String::Latin1, &pos);
|
||||
/* Now we need at least two more bytes available */
|
||||
if (pos + 1 >= data.size()) {
|
||||
debug("Truncated picture frame.");
|
||||
return;
|
||||
}
|
||||
|
||||
d->type = (TagLib::ID3v2::AttachedPictureFrame::Type)data[pos++];
|
||||
d->description = readStringField(data, d->textEncoding, &pos);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user