mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 16:37:35 +00:00
LibPDF: Use TRY() to get decompression result
Makes us die with a better error message for some PDFs.
This commit is contained in:
parent
6153dd7b84
commit
cf705eb235
1 changed files with 1 additions and 1 deletions
|
@ -212,7 +212,7 @@ PDFErrorOr<ByteBuffer> Filter::decode_lzw(ReadonlyBytes)
|
||||||
|
|
||||||
PDFErrorOr<ByteBuffer> Filter::decode_flate(ReadonlyBytes bytes, int predictor, int columns, int colors, int bits_per_component)
|
PDFErrorOr<ByteBuffer> Filter::decode_flate(ReadonlyBytes bytes, int predictor, int columns, int colors, int bits_per_component)
|
||||||
{
|
{
|
||||||
auto buff = Compress::DeflateDecompressor::decompress_all(bytes.slice(2)).value();
|
auto buff = TRY(Compress::DeflateDecompressor::decompress_all(bytes.slice(2)));
|
||||||
if (predictor == 1)
|
if (predictor == 1)
|
||||||
return buff;
|
return buff;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue