Skip to content

Commit 1032548

Browse files
author
Grok Compression
committed
codestream: don't allow more than one SIZ marker
fixes oss-fuzz issue 461218726
1 parent 4aa168c commit 1032548

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/lib/core/codestream/markers/SIZMarker.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,11 @@ bool SIZMarker::read(CodeStreamDecompress* codeStream, uint8_t* headerData, uint
2929
uint32_t nb_comp_remain;
3030
uint32_t remaining_size;
3131
auto headerImage = codeStream->getHeaderImage();
32+
if(headerImage->numcomps > 0)
33+
{
34+
grklog.error("Only one SIZ marker allowed");
35+
return false;
36+
}
3237
auto cp = codeStream->getCodingParams();
3338

3439
/* minimum size == 39 - 3 (= minimum component parameter) */

0 commit comments

Comments
 (0)