[gfx] Use gzip stream total_out for SVG document parsing.

With this change, the assert is no longer necessary, because the stream
tells us how many elements to process.
This commit is contained in:
Brad Werth
2026-02-24 19:15:41 +01:00
committed by roytam1
parent 31c8f3a154
commit dccd7b8d91
+1 -2
View File
@@ -311,8 +311,7 @@ gfxSVGGlyphsDocument::gfxSVGGlyphsDocument(const uint8_t *aBuffer,
if (Z_OK == inflateInit2(&s, 16 + MAX_WBITS)) {
int result = inflate(&s, Z_FINISH);
if (Z_STREAM_END == result) {
MOZ_ASSERT(size_t(s.next_out - outBuf.Elements()) == origLen);
ParseDocument(outBuf.Elements(), outBuf.Length());
ParseDocument(outBuf.Elements(), s.total_out);
} else {
NS_WARNING("Failed to decompress SVG glyphs document");
}