diff options
author | Jay Berkenbilt <ejb@ql.org> | 2019-01-31 21:51:52 +0100 |
---|---|---|
committer | Jay Berkenbilt <ejb@ql.org> | 2019-02-01 02:28:44 +0100 |
commit | eb49e07c0afc1b30b53d3ae2849c824c9407f00d (patch) | |
tree | e7c73b1115fcd5b7ea3c62376cb10e680724fb1c /libqpdf/QPDFObjectHandle.cc | |
parent | 5211bcb5eaa2b6b3c8aa48580f1b97314c37bb4a (diff) | |
download | qpdf-eb49e07c0afc1b30b53d3ae2849c824c9407f00d.tar.zst |
Make inline image token exactly contain the image data
Do not include the trailing EI, and handle cases where EI is not
preceded by a delimiter. Such cases have been seen in the wild.
Diffstat (limited to 'libqpdf/QPDFObjectHandle.cc')
-rw-r--r-- | libqpdf/QPDFObjectHandle.cc | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/libqpdf/QPDFObjectHandle.cc b/libqpdf/QPDFObjectHandle.cc index de5d56b3..a3a4d61d 100644 --- a/libqpdf/QPDFObjectHandle.cc +++ b/libqpdf/QPDFObjectHandle.cc @@ -1570,16 +1570,7 @@ QPDFObjectHandle::parseContentStream_data( } else { - // Skip back over EI - input->seek(-2, SEEK_CUR); - std::string inline_image = t.getRawValue(); - for (int i = 0; i < 3; ++i) - { - if (inline_image.length() > 0) - { - inline_image.erase(inline_image.length() - 1); - } - } + std::string inline_image = t.getValue(); QTC::TC("qpdf", "QPDFObjectHandle inline image token"); callbacks->handleObject( QPDFObjectHandle::newInlineImage(inline_image)); |