diff --git a/taglib/mpeg/id3v2/frames/textidentificationframe.cpp b/taglib/mpeg/id3v2/frames/textidentificationframe.cpp index 8d61378e..14e96622 100644 --- a/taglib/mpeg/id3v2/frames/textidentificationframe.cpp +++ b/taglib/mpeg/id3v2/frames/textidentificationframe.cpp @@ -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]);