mirror of
https://github.com/taglib/taglib.git
synced 2025-05-27 21:20:26 -04:00
Add another sanity check -- don't let invalid frames try to allocate anything
larger than the tag size. BUG:140515 git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@633123 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
This commit is contained in:
parent
3218095aca
commit
4382e84e9e
@ -73,7 +73,10 @@ Frame *FrameFactory::createFrame(const ByteVector &data, uint version) const
|
||||
// A quick sanity check -- make sure that the frameID is 4 uppercase Latin1
|
||||
// characters. Also make sure that there is data in the frame.
|
||||
|
||||
if(!frameID.size() == (version < 3 ? 3 : 4) || header->frameSize() <= 0) {
|
||||
if(!frameID.size() == (version < 3 ? 3 : 4) ||
|
||||
header->frameSize() <= 0 ||
|
||||
header->frameSize() > data.size())
|
||||
{
|
||||
delete header;
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user