Fix segv in CPDF_DataAvail::CheckRoot() when /Root object is a string.
authorTom Sepez <tsepez@chromium.org>
Thu, 5 Feb 2015 18:41:08 +0000 (10:41 -0800)
committerTom Sepez <tsepez@chromium.org>
Thu, 5 Feb 2015 18:41:08 +0000 (10:41 -0800)
commit219b3dab7e184bf8742f61527e37053b04903ff0
tree8ce24202dc2fd5a61774c947e5eecf007bea6bf9
parentdabc5d57bf473708295800a7991bc1fafdf76288
Fix segv in CPDF_DataAvail::CheckRoot() when /Root object is a string.

Handles the case of this malformed PDF without crashing. Note that to
get a reproducible test case, a small fix is applied to our .py script
which results in some whitespace/numbering difs across the resources
(down the road, we ought to generate them on the fly in an intermediate
directory).

BUG=454695
R=jun_fang@foxitsoftware.com, thestig@chromium.org

Review URL: https://codereview.chromium.org/895933003
13 files changed:
core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp
fpdfsdk/src/fpdfview_embeddertest.cpp
testing/resources/bug_451265.pdf
testing/resources/bug_452455.pdf
testing/resources/bug_454695.in [new file with mode: 0644]
testing/resources/bug_454695.pdf [new file with mode: 0644]
testing/resources/bug_57.pdf
testing/resources/hello_world.pdf
testing/resources/named_dests.pdf
testing/resources/trailer_as_hexstring.pdf
testing/resources/trailer_unterminated.pdf
testing/resources/weblinks.pdf
testing/tools/fixup_pdf_template.py