summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/fpdfview_embeddertest.cpp
AgeCommit message (Collapse)Author
2016-01-19Merge to XFA: Fix infinite loops caused by calling circular indirect objectsWei Li
There are multiple functions in CPDF_Object class which can cause infinite loop due to recursively calling circular indirect objects. Fix them by deference indirect object first. BUG=pdfium:355 TBR=jun_fang@foxitsoftware.com, thestig@chromium.org Review URL: https://codereview.chromium.org/1585533002 . (cherry picked from commit 90853cb1dfd1bf3803ec21cfae3e93948137be61) Review URL: https://codereview.chromium.org/1602103004 .
2016-01-14Merge to XFA: Loose checking for trailer's size fieldWei Li
Although trailer's size value is required by spec, other readers such as Acrobat or libpoppler can handle without it. Loose up the check to be more tolerant. BUG=pdfium:213 R=thestig@chromium.org TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1582193002 . (cherry picked from commit 34291b900ad0472eef582215cfce0d942a40fd16) Review URL: https://codereview.chromium.org/1589783004 .
2016-01-14Merge to XFA: Correct the way to count pages and to avoid infinite loopWei Li
BUG=pdfium:360 TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1585823003 . (cherry picked from commit 5d5d9fe7bd1c9566b9d6570015b7c60894d9fc0c) Review URL: https://codereview.chromium.org/1583073004 .
2016-01-11Merge to XFA: Fix an infinite loop parsing in CPDF_SyntaxParser::GetObject()Wei Li
CPDF_SyntaxParser::GetObject() may enter into an infinite loop when a signature dictionary doesn't have 'Contents' field. Add a check to avoid that. BUG=pdfium:344 TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1575833004 . (cherry picked from commit d3ab0f383f6736657480a8bb418c5e715a1aed3b) Review URL: https://codereview.chromium.org/1571333004 .
2016-01-08Merge to XFA: Fix infinite loop caused by parsing same indirect objectsWei Li
BUG=pdfium:343 TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1569343002 . (cherry picked from commit 149f1db8bba85bdf2b40d330c38f2478695ca0d5) Review URL: https://codereview.chromium.org/1575663002 .
2016-01-06Invalidate IPWL_FocusHandler and IPWL_Provider on destruction.Lei Zhang
BUG=572871 TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1564773003 . (cherry picked from commit dcac57bc8b64fdc870d79d11a498ae7021cf8ae7) Review URL: https://codereview.chromium.org/1569663002 .
2016-01-05Merge to XFA: Exit infinite loops for cross reference loadingWei Li
When cross reference sections form a loop, our code will enter an infinite loop. Add detection and exit code for v4 cross reference loading. V5 loading was done previously. TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1558093002 . (cherry picked from commit aab8f462ea3368ed4825172231131e1a10db978d) Review URL: https://codereview.chromium.org/1556423002 .
2015-12-09Merge to XFA: Prevent infinite looping in CPDF_Parser::LoadAllCrossRefV5().Lei Zhang
BUG=pdfium:298 TBR=weili@chromium.org Review URL: https://codereview.chromium.org/1496703005 . (cherry picked from commit 93181f9a20db7ac706bb9405750303db93762a5b) Review URL: https://codereview.chromium.org/1514783002 .
2015-12-09XFA: Revert UTF16LE_Encode changesOliver Chang
Revert "Fix embedder test failures introduced by commit c70b19aad245" This reverts commit 8d89e65897d8b6cf7899e7a82d9d381c3ad327cb. Revert "Fix invalid buffer length set in CFX_WideString::UTF16LE_Encode()" This reverts commit c70b19aad245fb1ed39bf8c264d991555f4c5a58. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1516643002 .
2015-11-25Fix embedder test failures introduced by commit c70b19aad245Jun Fang
BUG=pdfium:275 TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1443603002. Review URL: https://codereview.chromium.org/1477693002 .
2015-11-09Merge to XFA: Add path service to retrieve test data directory at run time ↵Wei Li
so tests can be run from any directory. Previously the tests which read test files assume the current directory is under pdfium. Running from any other directory will break the build. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1408003014 . (cherry picked from commit c0e93a9a942fe7d99800502a61d2fbb58cf9276f) Conflicts: core/src/fpdfapi/fpdf_parser/fpdf_parser_parser_embeddertest.cpp fpdfsdk/src/fpdfdoc_embeddertest.cpp testing/embedder_test.cpp testing/embedder_test.h Review URL: https://codereview.chromium.org/1411403012 .
2015-11-06Merge to XFA: Fix all relative includes to public.Lei Zhang
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1415803007 . (cherry picked from commit 5899671184d01b74989d181363066379ef3e4051) Review URL: https://codereview.chromium.org/1431593007 .
2015-10-28Merge to XFA: Check if document was opened during testing.Dan Sinclair
When we call OpenDocument we fail to check if the document was actually opened. Currently we return true in all cases (assuming we read the file). This CL updates the code to check if the document was opened and return false if not. I've updated several tests to check for FALSE instead of TRUE. I verified the documents in fact don't open with my local (non-PDFium) PDF reader. BUG=pdfium:223 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1417893007 . (cherry picked from commit dd4cd523ef4546b43d68e8ca6ec0a97fbe8954e9) Review URL: https://codereview.chromium.org/1418563010 .
2015-08-04XFA: clang-format all pdfium code.Nico Weber
No behavior change. Generated by: find . -name '*.cpp' -o -name '*.h' | \ grep -E -v 'third_party|thirdparties|lpng_v163|tiff_v403' | \ xargs ../../buildtools/mac/clang-format -i Then manually merged https://codereview.chromium.org/1269223002/ See thread "tabs vs spaces" on pdfium@googlegroups.com for discussion. BUG=none
2015-05-15Merge to XFA: Fix leaks in the embedder tests themselves.Lei Zhang
Also change EmbedderTest::TearDown() to match the destruction order in Chromium's PDF code. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1138143003 (cherry picked from commit 61ffad8df484ab9b3f7d2f5519ec470fbc023b88) Review URL: https://codereview.chromium.org/1138973004
2015-05-12Merge to XFA: Make (and verify) public/ files compile under C.Tom Sepez
The following files needed adjustment beyond a mechanical merge: fpdfsdk/src/fpdfview.cpp public/fpdf_formfill.h samples/pdfium_test.cc testing/embedder_test.cpp Original Review URL: https://codereview.chromium.org/1130843003 BUG=pdfium:158 R=thestig@chromium.org Review URL: https://codereview.chromium.org/1137233002
2015-05-11Merge to XFA: Create top-level public/ header directory.Tom Sepez
Original Review URL: https://codereview.chromium.org/1135913002 BUG=pdfium:154 R=thestig@chromium.org Review URL: https://codereview.chromium.org/1136703003
2015-02-05Merge to XFA: Fix segv in CPDF_DataAvail::CheckRoot()Tom Sepez
Original Review URL: https://codereview.chromium.org/895933003 BUG=454695 TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/901013003
2015-02-03Merge to XFA: Fix stack exhaustion in CPDF_DataAvail::HaveResourceAncestor()Tom Sepez
Original Review URL: https://codereview.chromium.org/880043004 TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/893333003
2015-02-02Merge to XFA: Add embedder test for fix to bug_452455.Tom Sepez
Original Review URL: https://codereview.chromium.org/887063003 TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/895713003
2015-01-30Merge to XFA: track formhandles in embeddder test class itselfTom Sepez
TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/891763003
2015-01-26XFA: make FPDFViewEmbeddertest.Crashers test run successfully.Tom Sepez
XFA is pickier, and returns false when loading some mangled documents. TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/864953004
2015-01-26Merge to XFA: Fix infinite recursion in CPDF_Parser::ParseIndirectObjectAt().Tom Sepez
Orignal Review URL: https://codereview.chromium.org/875263002 TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/880753002
2015-01-22Merge to XFA: Add embeddertests.Tom Sepez
This brings in: 83f96a0 Add API tests: NamedDestsByName, DestGetPageIndex. 9dcd7b8 Add tests for GetNamedDests() API. TBR=bo_xu@foxitsoftware.com Review URL: https://codereview.chromium.org/849693007
2015-01-16Merge to XFA: PDFium embeddertests.Tom Sepez
This consists of two origin/master CLs: Review URL: https://codereview.chromium.org/857483005 Review URL: https://codereview.chromium.org/827733006 It also fixes a couple of segv's in XFA when the library is initialized and destroyed multiple times in the same process. R=jam@chromium.org TBR=jam@chromium.org Review URL: https://codereview.chromium.org/856623004