summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2016-08-04openjpeg: Prevent overflows when using opj_aligned_malloc()gogil
BUG=628304 R=thestig@chromium.org, ochang@chromium.org Review-Url: https://codereview.chromium.org/2218783002
2016-08-04Move CFX_GEModule into its own filenpm
This is the first CL in an attempt to split up the classes in fxge/include/fx_ge.h into their own files. Review-Url: https://codereview.chromium.org/2217663002
2016-08-04openjpeg: Prevent integer overflows during calculation of ↵gogil
|l_nb_code_blocks_size| BUG=628890 R=ochang@chromium.org Review-Url: https://codereview.chromium.org/2212973002
2016-08-04Use smart pointers for class owned pointersweili
For classes under xfa/fgas, xfa/fwl/basewidget, and xfa/fwl/core, use smart pointers instead of raw pointer to make memory management easier. BUG=pdfium:518 Review-Url: https://codereview.chromium.org/2207093005
2016-08-04Remove unnecessary casting in CPVT_GenerateAP.jaepark
Since CFX_BinaryBuf::GetBuffer() returns uint8_t*, casting to uint8_t* is unnecessary. Review-Url: https://codereview.chromium.org/2218633002
2016-08-04Use smart pointers for class owned pointers under xfa/fdeweili
Use smart pointer to replace raw pointer type for class owned member variables so that memory management will be easier. BUG=pdfium:518 Review-Url: https://codereview.chromium.org/2208423002
2016-08-04Fix issue when firing TimerProc() destroys timerchromium/2820tsepez
We must look the timer up a second time since the callback may have released it. BUG=634394 Review-Url: https://codereview.chromium.org/2214003003
2016-08-04Beef up timer cancellation teststsepez
Adds more questionable invocations of ClearTimeOut(). Also, checking that nothing happened is fragile. Log at least one thing to show that the code ran. Review-Url: https://codereview.chromium.org/2218473002
2016-08-04Fix a file name typoweili
Fix a file name to be consistent with its class name and header file name. Review-Url: https://codereview.chromium.org/2215813003
2016-08-04Clean up fx_ge_linux.cpp a little.thestig
Review-Url: https://codereview.chromium.org/2218433002
2016-08-04Add bounds checks to CWeightTable::Calc() and friends.thestig
BUG=624514 Review-Url: https://codereview.chromium.org/2204773003
2016-08-04Fix libpng build for ARM.thestig
TBR=msarett@google.com Review-Url: https://codereview.chromium.org/2214543003
2016-08-03Remove unused method CPDFSDK_BAAnnot::CreateFormFiller.jaepark
Review-Url: https://codereview.chromium.org/2206283004
2016-08-03Update libpng to 1.6.22.thestig
Sync up with Chromium's copy of libpng. Review-Url: https://codereview.chromium.org/2132263002
2016-08-03Generate default AP stream for squiggly annotation.jaepark
This patch generates a default AP stream for squiggly annotation so that squiggly annotations without AP stream can be displayed. Also, roll DEPS for testing/corpus to a89e4fb to test squiggly annotations. BUG=62625 Review-Url: https://codereview.chromium.org/2206773004
2016-08-03Add test for bug 620428 (setinterval cancellation)tsepez
While we're at it, beef up existing test for non-cancellation. In turn, fix test harness to implement intervals properly. In turn, fix public documentation to be clearer about timers. Also rename a few identifiers that sounded "off". Review-Url: https://codereview.chromium.org/2211513002
2016-08-03Rename xfa_layout_pagemgr_new.hdsinclair
This renames the file to match the class name. Review-Url: https://codereview.chromium.org/2209823002
2016-08-03Roll skia to 96206a96f357cd30b60d1b1aa98e4e3a8f9b97f1msarett
Review-Url: https://codereview.chromium.org/2210563002
2016-08-03Use smart pointers for class owned pointersweili
For all classes under /fpdfsdk, use smart pointer to replace raw pointer type for class owned member variables so that memory management will be easier. BUG=pdfium:518 Review-Url: https://codereview.chromium.org/2173253002
2016-08-03Fixup class name spellingdsinclair
Fix CXFA_FMIdentifierExpressionn to remove the duplicate n. Review-Url: https://codereview.chromium.org/2210543002
2016-08-03Split xfa_layout_appadapterdsinclair
This moves the needed traverse strategies into their own files, removes the unused one and cleans up the includes. Review-Url: https://codereview.chromium.org/2207033002
2016-08-03Fix FMCallExpression undefined shift behaviour.dsinclair
When determining which params should be an object and which are a value it is possible to overflow the int on the shift comparision (if there are more then 32 arguments). This never happens in practise as it's a controlled list of method calls which we pass objects for. Cap the check at 32 for the shifting so it doesn't overflow. We can revisit and extend the value later if we ever have an internal formcalc method that needs an object in a position greater then 32. BUG=chromium:603490 Review-Url: https://codereview.chromium.org/2206253002
2016-08-02Generate default AP stream for strike out annotation.jaepark
This patch generates a default AP stream for strike out annotation so that strike out annotations without AP stream can be displayed. Also, roll DEPS for testing/corpus to ddc1938 to test strike out annotations. BUG=62625 Review-Url: https://codereview.chromium.org/2206083002
2016-08-02Generate default AP stream for underline annotation.jaepark
This patch generates a default AP stream for underline annotation so that underline annotations without AP stream can be displayed. Also, roll DEPS for testing/corpus to cae29d1 to test underline annotations. BUG=62625 Review-Url: https://codereview.chromium.org/2205543002
2016-08-02Splitting fpdfdoc/doc_* part III.dsinclair
This CL cleans up the remaining doc_* files, splitting into .h and .pp files as needed. Review-Url: https://codereview.chromium.org/2190983002
2016-08-02Bound total pixels in JBig2 images to avoid overflows later.tsepez
Also make these private to ensure they aren't modified so as to violate the bounds checks applied at creation time. BUG=633002 Review-Url: https://codereview.chromium.org/2202013002
2016-08-02Verify row bytes before alloc in BMP codec.dsinclair
If the out_row_bytes is negative the alloc will fail. Verify the size before alloc and bail if it's negative. BUG=633381 Review-Url: https://codereview.chromium.org/2202283003
2016-08-02Use PaintOperation instead of bFillOrStroke in CPVT_GenerateAP.jaepark
Also, use PaintOperation instead of bStrokingOperation in CPDF_DefaultAppearance. Review-Url: https://codereview.chromium.org/2197353002
2016-08-02Splitting fpdfdoc/doc_* part II.dsinclair
This splits the doc_ocg, doc_vt and doc_basic files into individual class files. Review-Url: https://codereview.chromium.org/2187073005
2016-08-02Introduce ::getPropertyInternal method to avoid duplicationchromium/2819chromium/2818chromium/2817tonikitoo
Document.cpp implements "getter" methods for some of the Document object properties. Some of the body of such methods are identical. Patch introduces a ::getPropertyInternal private method that gets rid of this duplication. Namely the following properties' getters are cleaned up: - "author", "creationDate", "creator", "keywords", - "modDate", "producer", "subject" and "title" No behavior change. Review-Url: https://codereview.chromium.org/2202283002
2016-08-02Fix Jbig2 document context creation by checking proper pointerweili
The pointer a unique_ptr contains should be checked instead of the pointer of the unique_ptr itself. BUG=chromium:631912 Review-Url: https://codereview.chromium.org/2205573004
2016-08-02Splitting fpdfdoc/doc_* part Idsinclair
The first of several CLs to split the core/fpdfdoc/doc_* files up to individual class files. Review-Url: https://codereview.chromium.org/2192823002
2016-08-02Fixup crypto key generation.dsinclair
This CL fixes up the crypto key copying code to better handle big endian machines. BUG=pdfium:147 Review-Url: https://codereview.chromium.org/2190123002
2016-08-01Fix a memory leak in libtiff.thestig
BUG=633387 Review-Url: https://codereview.chromium.org/2204793002
2016-08-01Support PDF highlight annotation with opacity.jaepark
BUG=62625 Review-Url: https://codereview.chromium.org/2202063002
2016-08-01Watch for destruction of CPDFSDK_widget during callbacktsepez
Speculative fix since I had trouble with the repro. BUG=632709 Review-Url: https://codereview.chromium.org/2197793002
2016-07-29Generate default AP stream for highlight annotation.jaepark
This patch generates a default AP stream for highlight annotation so that highlight annotations without AP stream can be displayed. BUG=62625 Review-Url: https://codereview.chromium.org/2193983002
2016-07-29Simplify some FPDF edit functions.thestig
Fix an unlikely memory leak in FPDFPage_InsertObject(). BUG=pdfium:545 Review-Url: https://codereview.chromium.org/2195643002
2016-07-29Use bool instead of FX_BOOL as return values in CPVT_GenerateAP.jaepark
Review-Url: https://codereview.chromium.org/2196903002
2016-07-29Add build configuration for experimental Windows GDI code.chromium/2816chromium/2815chromium/2814thestig
BUG=409472 Review-Url: https://codereview.chromium.org/2193783002
2016-07-29Refactor fxge/fx_apple and fx_win header filesnpm
- Renamed header for CFX_QuartzDevice class - Removed unused class CFX_WinBitmapDevice - Split remaining fx_ge_win32 header Review-Url: https://codereview.chromium.org/2197513004
2016-07-29Fix a FPE in CStretchEngine::StartStretchHorz().thestig
Do some cleanup in the process. BUG=629839 Review-Url: https://codereview.chromium.org/2190283003
2016-07-29Cleanup CPDF_DocPageData release methods and callers.thestig
Review-Url: https://codereview.chromium.org/2194853002
2016-07-28Remove the document tagged code as it is unused.dsinclair
The fpdf_tagged.h, tagged_int.h and doc_tagged.cpp code is currently unused and can be removed. Review-Url: https://codereview.chromium.org/2188213002
2016-07-28Split fpdfdoc/include/fpdf_doc.h into individual classes.dsinclair
This CL splits the header file apart. The cpp files are not touched as part of this CL, they will be done as a followup. This de-duplicates the fpdf_doc.h BUG=pdfium:249 Review-Url: https://codereview.chromium.org/2183313004
2016-07-28fix text matrix againcaryclark
The text matrix for Skia is still wrong. The last fix allowed text to draw correctly when rotated, but did not draw correctly when skewed. With this edit, text draws correctly rotated, skewed horizontally, skewed vertically, and rotated and skewed. R=dsinclair@chromium.org Review-Url: https://codereview.chromium.org/2189093002
2016-07-27Fixup integer conversion logic.chromium/2813chromium/2812chromium/2811dsinclair
In bc8a64029f898286c3dcad3a6cecdc98ef30b139 we updated the FX_atonum logic to correctly handle integer overflow. This causes issues when parsing the Permissions flag of encrypted documents as that flag isn't encoded like other numbers. The Permissions flag is a unsigned value, and has to be treated as such since the sign bit is always set. The current logic will detect an overflow of the int value and return 0. The old logic would have detected the overflow and returned the negative result regardless. This CL updates the logic to do the string to int conversion as a uint32_t and then verifies the uint32_t value, if a sign was provided, fits within the int range, otherwise it converts it to an int and lets it be positive or negative as needed. BUG=pdfium:539 Review-Url: https://codereview.chromium.org/2168173002
2016-07-27Splitting fx_ge_fontmap.cppnpm
Move CFX_FolderFontInfo, CFX_FontMgr, and CFX_FontMapper into their own classes. There are namespaces in each of the new files, having methods from the original namespace in fx_ge_fontmap, according to what each class needs. Review-Url: https://codereview.chromium.org/2185533006
2016-07-27Reland of Remove pageview from map immediatelydsinclair
This reverts commit f2cee9894b9f7cf2e50060965ad1eedd90ab55b6. This CL removes the default parameter from the CPDFSDK_Document::GetPageView |ReNew| flag and updates the code as needed. In CFFL_FormFillter::KillFocusForAnnot we flip the flag to |FALSE| as we don't want to re-create the page view if it is already removed. If we don't do this then the page view will be re-created in the map, the page associated to the page view, but then the page can be deleted out from under the pageview as it isn't owned by the page view. BUG=chromium:630654 Review-Url: https://codereview.chromium.org/2179163004
2016-07-26Use smart pointer for CPDF_Form in CPDF_Annot.jaepark
CPDF_Annot owns CPDF_Form, so use std::unique_ptr for memory management. BUG=pdfium:518 Review-Url: https://codereview.chromium.org/2189463003