summaryrefslogtreecommitdiff
path: root/core/src
AgeCommit message (Collapse)Author
2014-07-23Refactor CFX_BasicArray.chromium/2112chromium/2111chromium/2110chromium/2109chromium/2108chromium/2107chromium/2106chromium/2105chromium/2104Chris Palmer
The |nGrowBy| argument to |SetSize| was always -1, which caused the effective m_nGrowBy value to always be its default value: 0. So it was not needed, and was cluttering up the logic. BUG=384662 Check for integer overflow in CFX_BasicArray. BUG=384662 R=bo_xu@foxitsoftware.com, rsesek@chromium.org Review URL: https://codereview.chromium.org/415803002
2014-07-23Check for integer overflow in CFX_BasicArray.Chris Palmer
BUG=384662 R=bo_xu@foxitsoftware.com, rsesek@chromium.org Review URL: https://codereview.chromium.org/411033003
2014-07-23Remove unnecessary aligned memory check when __SSE__ is usedBo Xu
Since the land of https://pdfium.googlesource.com/pdfium/+/3522876d5291922ddc62bf1b70d02743b0850673, memory is assured to be 16 byte aligned. So no need to do this check. Plus, the removed code was causing bug in M36: https://code.google.com/p/pdfium/issues/detail?id=27. BUG=None R=thestig@chromium.org Review URL: https://codereview.chromium.org/418563002
2014-07-21Adjust null object checkchromium/2103chromium/2102Bo Xu
BUG=None R=thakis@chromium.org Review URL: https://codereview.chromium.org/396173003
2014-07-21Fix remaining -Wdelete-non-virtual-dtor violations on Windows.Nico Weber
Follow-up to https://codereview.chromium.org/370853002/ BUG=none R=bo_xu@foxitsoftware.com Review URL: https://codereview.chromium.org/406683005
2014-07-18Fix the potential integer overflow from "offset + size".Chris Palmer
BUG=382667 R=jschuh@chromium.org, jun_fang@foxitsoftware.com Review URL: https://codereview.chromium.org/390983007
2014-07-18Fix pdfium building issue on VS2010chromium/2098Jun Fang
BUG=pdfium_23 R=palmer@chromium.org Review URL: https://codereview.chromium.org/399233002
2014-07-18pdfium: Fix all -Wdelete-non-virtual-dtor violations on Mac.Nico Weber
Calling `delete` on an object of a type that has virtual functions but not a virtual destructor is questionable: Since the object has virtual functions, it likely has subclasses, so if it's deleted through the base pointer and the destructor isn't virtual, the subclass destructor won't be called. In most cases, the classes getting deleted can just be marked final to tell the compiler that it can't possibly have subclasses (this also enables the compiler to generate better code). Two classes didn't have any sub- or superclasses but virtual functions - this doesn't make sense, so make all methods of these classes non-virtual. (Also delete an unused function on one of the two classes.) In one case, a class actually did have a subclass that needs to be deleted virtually, so mark one destructor as virtual. BUG=none R=bo_xu@foxitsoftware.com Review URL: https://codereview.chromium.org/370853002
2014-07-17Fix garbled text when loading linearized pdf documentBo Xu
BUG=260112, 249006, 275281, 354966, 365302, 236952 R=thestig@chromium.org Review URL: https://codereview.chromium.org/400083002
2014-07-16Remove unused variable orig_size.Bo Xu
Original patch by Andrey Khalyavin <halyavin@google.com> BUG=N/A R=bo_xu@foxitsoftware.com Review URL: https://codereview.chromium.org/384143002
2014-07-16Remove uninitialized const global g_GbFontNameMap.Nico Weber
C++11 makes uninitialized const PODs an error, because they contain uninitialized memory (they're uninitialized that can never be initialized (because they're const). In this case, the memory was only used by _GetSubFontName() if the lang parameter was 1, but _GetSubFontName() is only called from one place, with a lang parameter of 0. So remove _GetSubFontName()'s lang parameter too. (Using bsearch for searching an array that always has exactly 2 entries is overkill too, but I'm trying to keep the diff small.) No intended behavior change. Fixes this error on the clang/win bot: ..\..\third_party\pdfium\core\src\fxge\win32\fx_win32_device.cpp(207,20) : error(clang): default initialization of an object of const type 'const _FontNameMap [1]' const _FontNameMap g_GbFontNameMap[1]; ^ BUG=chromium:82385 R=bo_xu@foxitsoftware.com Review URL: https://codereview.chromium.org/369343003
2014-07-15Error handling for invalid component number in CPDF_ICCBasedCS::v_LoadJun Fang
BUG=386728 R=palmer@chromium.org Review URL: https://codereview.chromium.org/397803002
2014-07-14Fix uninitialized coords in _DrawCoonPatchMeshesJun Fang
BUG=391470 R=palmer@chromium.org Review URL: https://codereview.chromium.org/384593002
2014-07-14Fix uninitialized nresults in GetRGBJun Fang
BUG=387809 R=palmer@chromium.org Review URL: https://codereview.chromium.org/379283003
2014-07-14Fix uninitialized RGB in DrawShadingJun Fang
BUG=386730 R=palmer@chromium.org Review URL: https://codereview.chromium.org/379923012
2014-07-14Fix uninitialized Storage in _LUTeval16foxit
BUG=387826 R=palmer@chromium.org Review URL: https://codereview.chromium.org/387273002
2014-07-14Add support to extract viewer preferenceBo Xu
This change adds the support to extract "NumCopies", "PrintPageRange", "Duplex" viewer preferences for printing. BUG=169120 R=bo_xu@foxitsoftware.com, vitalybuka@chromium.org Review URL: https://codereview.chromium.org/345123002
2014-07-14Fix an out-of-boundary issue for wide stringBo Xu
BUG=381521 R=palmer@chromium.org Review URL: https://codereview.chromium.org/383563002
2014-07-10Fix uninitialized Storagefoxit
BUG=387843 R=palmer@chromium.org Review URL: https://codereview.chromium.org/380293002
2014-07-10Fix uninitialized okeybuffoxit
BUG=387011 R=palmer@chromium.org Review URL: https://codereview.chromium.org/382603003
2014-07-10Fix uninitialized trianglefoxit
BUG=387835 R=palmer@chromium.org Review URL: https://codereview.chromium.org/381173002
2014-07-10Zero out temporary arrays before use in PDF encryption.Bo Xu
BUG=387834 R=palmer@chromium.org Review URL: https://codereview.chromium.org/386663003
2014-07-09Fix a null object bugBo Xu
BUG=387975 R=thakis@chromium.org Review URL: https://codereview.chromium.org/379273002
2014-07-09Fix a null object checkBo Xu
BUG=390615 R=thakis@chromium.org Review URL: https://codereview.chromium.org/378293005
2014-07-08Remove custom memory managerBo Xu
BUG= R=palmer@chromium.org Review URL: https://codereview.chromium.org/372473003
2014-07-08Fix for UMR in CXML_Parser::GetCharRef.Chris Palmer
BUG=387822 R=jun_fang@foxitsoftware.com Review URL: https://codereview.chromium.org/367383002
2014-07-08Fix integer overflow in fx_basic_[bw]string.cpp.Chris Palmer
BUG=382601 R=jun_fang@foxitsoftware.com Review URL: https://codereview.chromium.org/336003004
2014-07-07Fix a crasher issue due to invalid 'bits per component' in PDFfoxit
BUG=382820 R=palmer@chromium.org Review URL: https://codereview.chromium.org/349853003
2014-07-07fix a crash issue in _CMapLookupCallbackfoxit
BUG=382242 R=palmer@chromium.org Review URL: https://codereview.chromium.org/341333004
2014-07-07Fix uninitialized nresults and RGBfoxit
BUG=387785 R=palmer@chromium.org Review URL: https://codereview.chromium.org/362403002
2014-07-07Fix uninitialized offsetfoxit
BUG=387783 R=palmer@chromium.org Review URL: https://codereview.chromium.org/368783004
2014-07-07Fix uninitialized RGB in GetRGBfoxit
BUG=386729 R=palmer@chromium.org Review URL: https://codereview.chromium.org/366803003
2014-07-07Fix uninitialized RGB in translating scanlinefoxit
BUG=387841 R=palmer@chromium.org Review URL: https://codereview.chromium.org/354363003
2014-07-07Integer overflow in fx_basic.h and fx_memory.hfoxit
BUG=382656 R=palmer@chromium.org Review URL: https://codereview.chromium.org/334573007
2014-07-07Fix uninitialized RGB in LoadPalettefoxit
BUG=387506 R=palmer@chromium.org Review URL: https://codereview.chromium.org/361103002
2014-07-07Fix uninitialized font_offsetfoxit
BUG=387840 R=palmer@chromium.org Review URL: https://codereview.chromium.org/354413002
2014-06-30Fix checklicenses in chromiumJohn Abd-El-Malek
2014-06-30Remove "this==NULL" and adjust corresponding callersBo Xu
BUG= R=thakis@chromium.org Review URL: https://codereview.chromium.org/361553002
2014-06-20BUG=382241foxit
R=palmer@chromium.org Review URL: https://codereview.chromium.org/331123002
2014-06-20Fix a crash in CFXMEM_FixedMgr::AllocLargefoxit
BUG=382243 R=palmer@chromium.org Review URL: https://codereview.chromium.org/333213002
2014-06-20Stack-buffer-overflow in IccLib_Translatefoxit
BUG=382240 R=palmer@chromium.org Review URL: https://codereview.chromium.org/332143002
2014-06-12resolve symbol collsion with zlib 1.2.8Bo Xu
R=jam@chromium.org Review URL: https://codereview.chromium.org/330023004
2014-06-12Enable security removal in FPDF_Doc_SaveBo Xu
R=jam@chromium.org Review URL: https://codereview.chromium.org/333753002
2014-06-11Bring back the Skia files from the old repo.John Abd-El-Malek
BUG=11
2014-06-10BUG=379656foxit
R=palmer@chromium.org Review URL: https://codereview.chromium.org/320223003
2014-06-09free, rather than delete, malloc'd object.chromium/2076chromium/2075chromium/2074chromium/2073chromium/2072chromium/2071chromium/2070chromium/2069chromium/2068chromium/2067chromium/2066chromium/2065chromium/2064chromium/2063chromium/2061chromium/2060chromium/2059chromium/2058chromium/2057chromium/2056chromium/2055chromium/2054chromium/2053chromium/2052chromium/2051chromium/2050chromium/2049chromium/2048chromium/2047chromium/2046chromium/2045chromium/2044John Abd-El-Malek
BUG=381031 Original patch by Chris Palmer <palmer@chromium.org> Review URL: https://codereview.chromium.org/322453002
2014-06-09Fix a crash when parsing truetype fonts without any tables.Lei Zhang
BUG=chromium:381011 R=bo_xu@foxitsoftware.com Review URL: https://codereview.chromium.org/317203003
2014-06-08Use none SSE functions when data is not 16 byte alignedchromium/2043chromium/2042chromium/2041foxit
BUG= R=jabdelmalek@google.com Review URL: https://codereview.chromium.org/318593002
2014-06-05fix two uninitialized readsJohn Abd-El-Malek
https://code.google.com/p/pdfium/issues/detail?id=9 https://code.google.com/p/pdfium/issues/detail?id=10 BUG= R=bo_xu@foxitsoftware.com Review URL: https://codereview.chromium.org/312273002
2014-06-04Use unsigned type for iteration to avoid int overflow.John Abd-El-Malek
If src_len in PDF_DecodeText is larger than 2^31, 2 * max_chars will overflow and the function will produce an incorrect result. BUG=none R=bo_xu@foxitsoftware.com Review URL: https://codereview.chromium.org/306923006