mirror of
https://github.com/taglib/taglib.git
synced 2026-02-15 12:43:03 -05:00
Add some tests for huge memory allocation due to bad ID3v2 frame header flags.
The tests covers #466 and #486. Also fixes a compilation error on some compilers.
This commit is contained in:
@ -32,6 +32,7 @@
|
||||
#endif
|
||||
|
||||
#include <bitset>
|
||||
#include <cstring>
|
||||
|
||||
#include <tdebug.h>
|
||||
#include <tstringlist.h>
|
||||
@ -255,7 +256,7 @@ ByteVector Frame::fieldData(const ByteVector &frameData) const
|
||||
!d->header->encryption())
|
||||
{
|
||||
z_stream stream;
|
||||
memset(&stream, 0, sizeof(z_stream));
|
||||
::memset(&stream, 0, sizeof(z_stream));
|
||||
|
||||
if(inflateInit(&stream) != Z_OK)
|
||||
return ByteVector();
|
||||
|
||||
Reference in New Issue
Block a user