mirror of
https://github.com/qpdf/qpdf.git
synced 2025-01-22 22:58:33 +00:00
Use better error for getStreamData failure
If the stream isn't filterable but we call getStreamData, throw a regular exception instead of a logic error so that normal error handling and reporting mechanisms will be used.
This commit is contained in:
parent
48864b8d6e
commit
be27d47bdc
@ -96,7 +96,9 @@ QPDF_Stream::getStreamData(qpdf_stream_decode_level_e decode_level)
|
||||
Pl_Buffer buf("stream data buffer");
|
||||
if (! pipeStreamData(&buf, 0, decode_level, false, false))
|
||||
{
|
||||
throw std::logic_error("getStreamData called on unfilterable stream");
|
||||
throw QPDFExc(qpdf_e_unsupported, qpdf->getFilename(),
|
||||
"", this->offset,
|
||||
"getStreamData called on unfilterable stream");
|
||||
}
|
||||
QTC::TC("qpdf", "QPDF_Stream getStreamData");
|
||||
return buf.getBuffer();
|
||||
|
@ -4,4 +4,7 @@ WARNING: issue-148.pdf (xref stream: object 8 0, file position 73): attempting t
|
||||
WARNING: issue-148.pdf (xref stream: object 8 0, file position 73): recovered stream length: 2
|
||||
WARNING: issue-148.pdf (xref stream: object 8 0, file position 85): expected endobj
|
||||
WARNING: issue-148.pdf (file position 73): error decoding stream data for object 8 0: stream inflate: inflate: data: incorrect header check
|
||||
getStreamData called on unfilterable stream
|
||||
WARNING: issue-148.pdf: file is damaged
|
||||
WARNING: issue-148.pdf (file position 73): getStreamData called on unfilterable stream
|
||||
WARNING: issue-148.pdf: Attempting to reconstruct cross-reference table
|
||||
issue-148.pdf: unable to find trailer dictionary while recovering damaged file
|
||||
|
Loading…
x
Reference in New Issue
Block a user