Skip to content

Commit f1f36f1

Browse files
author
Grok Compression
committed
parseTilePart: put readId inside try/catch to catch InvalidMarkerException
1 parent 5b527cb commit f1f36f1

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/lib/core/tile_processor/TileProcessor.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -573,13 +573,18 @@ bool TileProcessor::parseTilePart(std::vector<std::unique_ptr<MarkerParser>>* pa
573573
}
574574
tpi.remainingTilePartBytes_ -= segmentLength;
575575
}
576+
if(!parser->readId(false))
577+
{
578+
success_ = false;
579+
return;
580+
}
576581
}
577582
catch(const CorruptSOTMarkerException& csme)
578583
{
579584
success_ = false;
580585
return;
581586
}
582-
if(!parser->readId(false))
587+
catch(const InvalidMarkerException& ime)
583588
{
584589
success_ = false;
585590
return;

0 commit comments

Comments
 (0)