Don't try to parse invalid frames.

BUG:137635


git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@633133 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
This commit is contained in:
Scott Wheeler 2007-02-13 09:55:56 +00:00
parent 4382e84e9e
commit 89b1e54ae0

View File

@ -94,6 +94,11 @@ void TextIdentificationFrame::setTextEncoding(String::Type encoding)
void TextIdentificationFrame::parseFields(const ByteVector &data)
{
// Don't try to parse invalid frames
if(data.size() < 2)
return;
// read the string data type (the first byte of the field data)
d->textEncoding = String::Type(data[0]);