summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2015-05-11Fix uninitialized face in fx_ge_font.cppchromium/2357Lei Zhang
MSAN reported this issue when I tried to reproduce 460936 in the last version of freetype on Linux. BUG=N/A R=thestig@chromium.org Review URL: https://codereview.chromium.org/1050333002 (cherry picked from commit 672bd1706a990069dce401afead6c2ecfcdb3357) Review URL: https://codereview.chromium.org/1136943003
2015-05-11Fix a heap overflow in CJBig2_Context::parseSymbolDictLei Zhang
BUG=476107 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1080893002 (cherry picked from commit eddab4425614e49146f904f00da4a664ba4b581b) Review URL: https://codereview.chromium.org/1135133002
2015-04-27Fix compiling warnings on WindowsJun Fang
TBR=tsepez@chromium.org BUG=N/A Review URL: https://codereview.chromium.org/1081663002
2015-04-27Fix a heap buffer overflow issue in CPDF_CMap::GetNextCharJUN FANG
Add a check to make sure offset is less than the size of string in the function of GetNextChar(). BUG=471651 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1067073003
2015-04-23Fix a regression with cut off images.Lei Zhang
This regressed in commit 3f41851 due to shadow variables. BUG=478164 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1101443004 (cherry picked from commit 97d10aff654e42c1b7c3d2abf33fbcf8d341799e) Review URL: https://codereview.chromium.org/1104713003
2015-04-23Fix a crashier due to images with abnormal sizeLei Zhang
BUG=453553 R=thestig@chromium.org, tsepez@chromium.org Review URL: https://codereview.chromium.org/1093323003 (cherry picked from commit ba920211c9569a38a4494398ac271a32098d81da) Review URL: https://codereview.chromium.org/1101123003
2015-04-13Fix a stack overflow issue caused by an invalid usage of snprintfLei Zhang
BUG=469244 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1062983002 (cherry picked from commit 5a82342845335770f975ef7f9a1b0bca1cf2d971) Review URL: https://codereview.chromium.org/1082043002
2015-04-13Fix a global buffer overflow in GCPDF_CIDFont::_CharCodeFromUnicodeLei Zhang
There is not a code page (CP) used for converting unicode to mutli-bytes if the coding scheme is CID coding. Only return 0 if CID can't be retrieved. The difference on Windows and other platforms should be the function used for converting rather than others. BUG=466790 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1074653002 (cherry picked from commit 1ed2ceb70476b135a3dedbb45549d6b3bc6ecdea) Review URL: https://codereview.chromium.org/1082893002
2015-04-06Update the path of header file to avoid a compiling error in chromeLei Zhang
BUG=N/A R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1059233005 (cherry picked from commit 9bf1f76771e04c20cb8a0f1c3d1938bdb965882e) Review URL: https://codereview.chromium.org/1066733002
2015-04-06Fix a compiling error in fpdf_parser_parser_embeddertest.cppLei Zhang
BUG=N/A R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1057383002 (cherry picked from commit 9cf3d5e448489996b7d04985d160077e58459d3d) Review URL: https://codereview.chromium.org/1060203003
2015-04-06Add embedder test comparing with the last patch.Lei Zhang
When there is a wrong keyword like '??ze' in the dictionary of the trailer, PDFium can't recognize it and aborts further parsing. After this change, PDFium continues even it can't get the right size at this moment. It will rebuild the cross reference table later since the size of the table is missing. BUG=459580 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1055323003 (cherry picked from commit e26ddf5eb0400c85680a865b6d4ddff293167169) Review URL: https://codereview.chromium.org/1061033004
2015-03-30Fix no text displayed issue when font embedded and font subsetting enabledchromium/2356chromium/2355chromium/2354chromium/2353chromium/2352JUN FANG
BUG=465322 R=thestig@chromium.org Review URL: https://codereview.chromium.org/1045553004
2015-03-26Replace linux-specific code in test scripts.Tom Sepez
Now that there's a win bot, this needs to be more careful. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1036073002
2015-03-26Use correctly-typed error codes for fx_codec_jpx_unittestTom Sepez
Needed to fix the failed pdfium_unittests on windows. Ironically, I created these constants so I wouldn't mix up size_t's and off_t's in these tests, but I didn't apply them consistently. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1036743005
2015-03-25Suppress many failing mac tests.Tom Sepez
There's investigation required to see why there are such platform differences, but for now, a perpetually red bot isn't useful. TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1002283003
2015-03-25Suppress our "pixel" test on mac since it diffs.Tom Sepez
This involves bringing some of the suppressions file mechanism into run_pixel_tests.py (making a common module would be a nice follow-up) R=thestig@chromium.org Review URL: https://codereview.chromium.org/1032923002
2015-03-25Create per-platform pdfium test suppression files.Tom Sepez
This is required now that we have win/mac bots, which may produce different outputs. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1031203003
2015-03-25Add testing/corpus to .gitignoreTom Sepez
TBR=halyavin@chromium.org Review URL: https://codereview.chromium.org/1032853004
2015-03-24Add comments to suppressions fileTom Sepez
No-op CL intended to trigger a rebuild. TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1036583002
2015-03-23Support comments and blank lines in SUPPRESSIONS fileTom Sepez
The comment character is #. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1029193002
2015-03-23Create simple suppressions file in PDFium repository.Tom Sepez
This is needed to green the tree without continually reverting the pdfium_tests (corpus) repository. We will need to make this more sophisticated at some point, but for now, let's try to green the buildbot. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1016613004
2015-03-23Flush stdout before launching sub-processes.Tom Sepez
This should make the test logs more readable. Also give failure summary at end of tests, since searching through the log is tedious. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1026903002
2015-03-23Try to make a NOTREACHED definition suitable for win8.chromium/2351chromium/2350chromium/2349chromium/2348chromium/2347chromium/2346chromium/2345chromium/2344chromium/2343Tom Sepez
See http://build.chromium.org/p/tryserver.chromium.win/builders/win8_chromium_gn_rel/builds/5674 Testing this is a two-step process: land CL to pdfium, then try DEPS roll in chromium against this version on the win8 trybots. TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1004733006
2015-03-20Roll DEPS to pull in full, regenerated corpus of testsTom Sepez
R=thestig@chromium.org Review URL: https://codereview.chromium.org/1023383003
2015-03-20Turn down warning level for GN build of image_diff utilityTom Sepez
Next attempt to get GN build to work. Once this lands, doing a DEPS roll against the win8_chromium_gn_dbg trybot seems to catch the issue. Restore image_diff_png.cc to its previous state. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1024243003
2015-03-20Fix missing include for std::minTom Sepez
Build broken on trybot at http://build.chromium.org/p/tryserver.chromium.win/builders/win8_chromium_rel/builds/66012/steps/compile%20%28with%20patch%29/logs/stdio R=thestig@chromium.org TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1026843002
2015-03-19Revert corpus to last known working version.Tom Sepez
Failures from last roll need diagnosis. TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1023913002
2015-03-19Fix corpus roll broken in the previous commit.Tom Sepez
R=thestig@chromium.org TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1020093002
2015-03-19Bring in entire corpus for testing.Tom Sepez
TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1021003002
2015-03-19Pull in specific revision of PDF corpus via DEPS.Tom Sepez
There are two reasons for doing this. The first is that adding files to this repository doesn't trigger a rebuild on the bot, so the next unrelated pdfium change will be the one to hit any issues with the unversioned corpus. The second is that we may need a specific version of the expected output files (.pngs) to go with a specific pdfium build. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1019783003
2015-03-19Fix subtle issues in opj_skip_from_memory and add unit tests.Tom Sepez
Follow on to https://codereview.chromium.org/990683002/. This more closely mimics what fseek() actually does, so as to avoid subtle bugs down the road. Move the DecodeData struct into a header so the test can use it, and provide a constructor for it. Along the way, I added include guards, removed the p_ prefix from some non-pointer vars, fixed some IWYU, and resolved some signed/unsigned comparison warnings with careful casting. BUG=452671 R=jun_fang@foxitsoftware.com, thestig@chromium.org Review URL: https://codereview.chromium.org/1016203002
2015-03-17Revert "TEST that the tree goes RED when pixel/javascript tests fail."Tom Sepez
This reverts commit de00893874a9d5ecae497e00511e2395fc2f02e8. TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1017793003
2015-03-17TEST that the tree goes RED when pixel/javascript tests fail.Tom Sepez
This will be immediately reverted, but I need to be sure that the previous change actually detects failures. TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1008873005
2015-03-17Return OS status code from python test driver scripts.Tom Sepez
Consequently, some of the tests may diff but the waterfall remains green. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1014083003
2015-03-17Revert "Fix a problem that JP2 image is not displayed because index color ↵Tom Sepez
space is used" This reverts commit 5a0e504d53195892458d819e52c62bea0c710bd5. Original review URL https://codereview.chromium.org/1009513003 Reason for revert: New "corpus" tests show that this is no longer rendering some images. See, e.g. http://chromegw/i/client.pdfium/builders/linux/builds/144/steps/corpus%20tests/logs/stdio for those that diff'd. TBR=jun_fang@foxitsoftware.com Review URL: https://codereview.chromium.org/1016823003
2015-03-16Pull our new test case repository via deps.Tom Sepez
Add a run_corpus_tests.py script to run pdfium_test against the corpus tree. Note that this differs from the run_pixel_tests.py script, since pre-processing is not required. I'll work on unifying these in a subsequent CL. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1010833003
2015-03-16Speculative fix for breakage in pdfum DEPS rollTom Sepez
Speculative because we still don't have pdfium buildbots for mac/win on the pdfium waterfall. Nonetheless, the two build errors reported in https://codereview.chromium.org/989213003/ seem to be a default statement in a switch fully covering all of an enum constant, and the use of <cstdint> instead of <stdint.h> on mac. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1011803003
2015-03-16Fix a problem that JP2 image is not displayed because index color space is usedJUN FANG
There are two issues in this bug. One is that JP2 image is not displayed because it aborts loading Jpx bitmap when the number of components in color space is different with that one in JPX images. I found that the number of components in color space isn't updated after it's initialized. For index color space, the component shall inherit from its base color space. The second issue is that displayed color is not correct after I fixed the first issue. The root cause is that sRGB is used in JPX image, it doesn't need to map from index to RGB again. BUG=464215 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1009513003
2015-03-16Fix a bug that JPX images can't be shownJUN FANG
In the process of opj_end_decompress, it will return fail when the end of coding stream is reached. However it returns true in the same scenario implemented in openJPEG. So the final solution is from openJPEG. Return true when the end of coding stream is reached. BUG=452671 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/990683002
2015-03-16Fix potential integer overflow in fpdf_render_image.cppJUN FANG
BUG=382661 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1007643002
2015-03-12Revert "Kill CFX_GrowOnlyPool."Tom Sepez
This reverts commit 090d683489bfa3f36f1e2624c310ff9ca5836038. Symbol appears in files that are not compiled anywhere, it would seem. Reverting to remove these first. TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1001023003
2015-03-12Kill CFX_GrowOnlyPool.Tom Sepez
It's unused, and when the time comes, we'll want to put pdfium onto a hardened allocator like partitionAlloc anyways. Along the way, merge adjacent #ifdef __cplusplus blocks, remove a pointless check for __cplusplus inside a .cpp file, and remove a redundant cast. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1008483002
2015-03-10Kill remaining sprintfsTom Sepez
I thought I had done this already, apart from the third-party libraries, but there were a couple remaining (the third-party libraries will still call this, they should be tweaked upstream as needed). R=thestig@chromium.org Review URL: https://codereview.chromium.org/999543002
2015-03-06Fix multiply defined macro in zlib.h on linux_chromium_clobber_rel_ng builder.Tom Sepez
Speculative fix since the issue doesn't reproduce locally. TBR=brettw@chromium.org Review URL: https://codereview.chromium.org/988883002
2015-03-06Make conversions for CPDF_Link explicit.Tom Sepez
Precursor to taking a second shot at cleaning up the FPDF_* APIs. A FPDF_LINK is a CPDF_Dictionary, and a CPDF_Link is a structure holding a FPDF_LINK. This goes against the convention that FPDF_ types get cast to CPDF_* types, so we want to make it clear where objects are getting constructed. R=thestig@chromium.org Review URL: https://codereview.chromium.org/985503005
2015-03-06Fix the pdfium component build.Brett Wilson
It has a component with no object files in it. When compiled as a shared library, this fails. This changes the target to a source set which can handle empty sources. It also changes the other static libraries in pdfium to source_sets (it should be very rare to need real static libraries). Runs "gn format" over the BUILD files. Renames the arg bundle_freetype to pdfium_bundle_freetype which makes more sense in the context of a larger build like Chrome. R=jam@chromium.org Review URL: https://codereview.chromium.org/985543002
2015-03-06Make conversion between CPDF_Dest and its object explicit.Tom Sepez
Precursor to taking a second shot at cleaning up the FPDF_* APIs. A FPDF_Dest is a CPDF_Array, and a CPDF_Dest is a structure holding a FPDF_Dest. This goes against the convention that FPDF_ types get cast to CPDF_* types, so we want to make it clear where objects are getting constructed, etc. R=thestig@chromium.org Review URL: https://codereview.chromium.org/984703004
2015-03-06Add gmock to .gitignoreTom Sepez
This is an attempt to fix git rebase-update, which complains about uncommitted changes. TBR=halyavin@chromium.org Review URL: https://codereview.chromium.org/985833002
2015-03-05Make conversion between CPDF_Action and its dictionary explicit.Tom Sepez
Precursor to taking a second shot at cleaning up the FPDF_* APIs. A FPDF_Action is a CPDF_Dictionary, and a CPDF_Action is a structure holding a FPDF_Action. This goes against the convention that FPDF_ types get cast to CPDF_* types, so we want to make it clear where objects are getting constructed, etc. Also tidy fpdf_actionhandler.cpp because it bugs me. R=thestig@chromium.org Review URL: https://codereview.chromium.org/984773002
2015-03-04Merge to Master: Fix a compiling error in fxjs_v8.hTom Sepez
Original Review URL: https://codereview.chromium.org/965423004 TBR=thestig@chromium.org TBR=jun_fang@foxitsoftware.com Review URL: https://codereview.chromium.org/976033005