Do bounds checking before assuming that just because we've been told that

there are actually more items that there actually are.

BUG:92028


git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@359382 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
This commit is contained in:
Scott Wheeler
2004-10-31 20:30:47 +00:00
parent df700f96f6
commit a3e62fb32e
4 changed files with 21 additions and 7 deletions

View File

@ -126,7 +126,9 @@ bool APE::Item::isEmpty() const
void APE::Item::parse(const ByteVector &data)
{
if(data.size() < 10) {
// 11 bytes is the minimum size for an APE item
if(data.size() < 11) {
debug("APE::Item::parse() -- no data in item");
return;
}