summaryrefslogtreecommitdiff
path: root/core/src/fxcrt
AgeCommit message (Collapse)Author
2015-06-09Merge to XFA: Use stdint.h types throughout PDFium.Tom Sepez
Near-automatic merge, plus re-running scripts to update additional usage. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1172793002
2015-06-09Merge to XFA: Remove more cruft from fx_system.hTom Sepez
New manual edits in the following to fix compilation: fx_bmp.h, fx_gif.h, fx_graphics.h Original Review URL: https://codereview.chromium.org/1169963003 R=thestig@chromium.org Review URL: https://codereview.chromium.org/1170103004
2015-06-04Merge to XFA: Move fx_safe_types.h to include/ directory.Tom Sepez
Original Review URL: https://codereview.chromium.org/1147353006 TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1152693005
2015-06-03Merge to XFA: Fix fx_basic_memmgr_unittest.cpp under stricter GN rulesTom Sepez
Original Review URL: https://codereview.chromium.org/1165863003 TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1163113002
2015-05-28Merge to XFA: Fix ALL the include guards.Tom Sepez
Original Review URL: https://codereview.chromium.org/1160443004 TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1162013003
2015-05-20Merge to XFA: Remove FX_Alloc() null checks now that it can't return NULL.Tom Sepez
Original Review URL: https://codereview.chromium.org/1142713005 R=thestig@chromium.org TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1143663008
2015-05-18Merge to XFA: Add safe FX_Alloc2D() macroTom Sepez
Original Review URL: https://codereview.chromium.org/1143663004 TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1136673005
2015-05-15Merge to XFA: Abort on OOM by default in FX_Alloc().Tom Sepez
Original Review URL: https://codereview.chromium.org/1128043009 Original Review URL: https://codereview.chromium.org/1142463005 R=thestig@chromium.org TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1144683002
2015-05-15Merge to XFA: Fix potential UAF in ConcatInPlace.Tom Sepez
Original Review URL: https://codereview.chromium.org/1130763007 TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1123333004
2015-05-14Merge to XFA: Make CFX_StringData be scoped by CFX_Bytestring and add methods.Tom Sepez
Original Review URL: https://codereview.chromium.org/1142533002 TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1135673003
2015-05-13Fix integer overflow in conversion from float to integer.JUN FANG
BUG=471991 R=brucedawson@chromium.org Review URL: https://codereview.chromium.org/1141613002
2015-05-13Merge to XFA: Fix comparison of CFX_ByteString and CFX_WideString.Tom Sepez
Original Review URL: https://codereview.chromium.org/1141763002 BUG=pdfium:160 TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1140093003
2015-05-06Merge to XFA:Remove FX_STRSIZE casts, use safe conversionsTom Sepez
Original Review URL: https://codereview.chromium.org/1124043003 BUG=pdfium:153 TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1132443002
2015-05-05Merge to XFA: Make sure string constructors are efficient on literalsTom Sepez
Besides the merge, there's one place where a wchar vs. wstring comparison was being made that no longer compiled. Original Review URL: https://codereview.chromium.org/1117263004 BUG=pdfium:151 R=thestig@chromium.org Review URL: https://codereview.chromium.org/1116163003
2015-05-04Merge to XFA: Fix issues with != and == in fx_basic_wstringTom Sepez
Original Review URL: https://codereview.chromium.org/1127753002 TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1119753004
2015-05-04Merge to XFA: Fix issuse with != and == shown by fx_basic_bstring unit tests.Tom Sepez
Original Review URL: https://codereview.chromium.org/1125703004 TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1126643003
2015-05-01Merge to XFA: Backfill some FX String/StringC unit tests for == and !=.Tom Sepez
Original Review URL: https://codereview.chromium.org/1118973005 Original Review URL: https://codereview.chromium.org/1122573002 R=thestig@chromium.org TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1126433002
2015-05-01Merge to XFA: CFX_ByteString/WideString header changesTom Sepez
Original Review URL: https://codereview.chromium.org/1117413002 Original Review URL: https://codereview.chromium.org/1118983003 TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1125493002
2015-04-30Merge to XFA: Take adavange of unused bytes at end of CFX stringsTom Sepez
Original Review URL: https://codereview.chromium.org/1112423003 Original Review URL: https://codereview.chromium.org/1120703003 TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1120813003
2015-04-28Merge to XFA: Make CFX_WideString::LockBuffer() completely unused.Tom Sepez
Original Review URL: https://codereview.chromium.org/1053613004 TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1115493002
2015-04-27Merge to XFA: Fix windows-specific usage of CFX_WideStr::operator LPCWSTR().Tom Sepez
Original Review URL: https://codereview.chromium.org/1103343002 R=brucedawson@chromium.org TBR=brucedawson@chromium.org Review URL: https://codereview.chromium.org/1105253002
2015-04-27Merge to XFA: Reduce usage of operator LPCWSTR from CFX_WideString().Tom Sepez
Original Review URL: https://codereview.chromium.org/1101933003 TBR=brucedawson@chromium.org Review URL: https://codereview.chromium.org/1108903002
2015-04-22Merge to XFA: Add missing operators for CFX_xxxString combo patch.Tom Sepez
This pulls in: Review URL: https://codereview.chromium.org/1099193002 Review URL: https://codereview.chromium.org/1090303003 Review URL: https://codereview.chromium.org/1084293003 Review URL: https://codereview.chromium.org/1099213002 Plus one fix to an XFA file to fix compilation. TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1095893005
2015-04-21Merge to XFA: Kill CFX_StringBufTemplate.Tom Sepez
Original Review URL: https://codereview.chromium.org/1098203002 TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1080633008
2015-04-14Merge to XFA: Kill CFX_Object.Tom Sepez
Not just a simple merge, but changes to remove CFX_Object from XFA. Original Review URL: https://codereview.chromium.org/1088733002 TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1087053002
2015-04-10Merge to XFA: Better fix for snprintf non-termination on windows.Tom Sepez
TBR=brucedawson@chromium.org Review URL: https://codereview.chromium.org/1073313003
2015-04-07Merge to XFA: Fix a stack overflow issue caused by an invalid usage of snprintfJun Fang
BUG=469244 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1062983002
2015-03-11Merge to XFA: Kill remaining sprintfsTom Sepez
There is fx_codec_png.cpp that has a sprintf under XFA that was not present in master. Original Review URL: https://codereview.chromium.org/999543002 R=thestig@chromium.org Review URL: https://codereview.chromium.org/995993002
2015-02-05Merge to XFA: Kill off some more unreachable fopen's.Tom Sepez
Original Review URL: https://codereview.chromium.org/902943003 TBR=jam@chromium.org Review URL: https://codereview.chromium.org/895903005
2015-02-05Merge to XFA: Add namespace and-re-arrange PDFium's local copy of /base.Tom Sepez
Original revieww URL: https://codereview.chromium.org/900753002 TBR=jam@chromium.org Review URL: https://codereview.chromium.org/880603004
2015-02-04Merge to XFA: Prevent base::CheckedNumeric from leaking outside of pdfium.Tom Sepez
Original review URL: https://codereview.chromium.org/896023003 TBR=jam@chromium.org Review URL: https://codereview.chromium.org/897023005
2015-01-21Merge to XFA: Simplify UTF16LE_Encode and add unittest.Bo Xu
Previously, UTF16LE_Encode take an optional flag to indicate if the returned byte string has trailing zeros. In fact, no where needs the flag to be false. So just get rid of it so callers won't misuse. The bug is found by https://codereview.chromium.org/837723009 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/860973002
2015-01-12Fix include paths for pdfium_unittests under chromium checkout.Tom Sepez
Here, testing/gtest and testing/some-pdfium-stuff will be different directories, since we will use the gtest at top-level. For standalone, they happen to be the same. TBR=bo_xu@foxitsoftware.com Review URL: https://codereview.chromium.org/852493002
2015-01-09merge to XFA: Fix -Wnon-virtual-dtor compiler warnings.Tom Sepez
Original at URL: https://codereview.chromium.org/810883005 Note that the new code in XFA introduces many more of these, to be handled separately. TBR=brucedawson@chromium.org TBR=thestig@chromium.org BUG=https://code.google.com/p/pdfium/issues/detail?id=102 Review URL: https://codereview.chromium.org/842223004
2015-01-07Merge to XFA: Finish unit test for CFX_ByteStringC class.Tom Sepez
Original CL at https://codereview.chromium.org/808553013 TBR=brucedawson@chromium.org Review URL: https://codereview.chromium.org/837253002
2015-01-07Merge to XFA: Add ostream helpers for FX String classes.Tom Sepez
Original CL at https://codereview.chromium.org/837843002 TBR=brucedawson@chromium.org Review URL: https://codereview.chromium.org/809313008
2014-12-30XFA: merge patch from CL 733693003, get rid of FX_LPCSTR castBo Xu
Get rid of FX_LPCSTR cast. Follow up on https://codereview.chromium.org/733693003 R=brucedawson@chromium.org, tsepez@chromium.org Review URL: https://codereview.chromium.org/809993004
2014-12-29Merge: Create pdfium_unittests binary. [XFA]Tom Sepez
Original CL at https://codereview.chromium.org/831653002/ TBR=palmer@chromium.org, brucedawson@chromium.org Review URL: https://codereview.chromium.org/830553002
2014-12-23XFA: merge patch from CL 733693003, getting rid of more castsBruce Dawson
Getting rid of more (FX_LPCWSTR) casts and fixing two bugs revealed by this. Since casts to FX_LPCWSTR have been shown to hide bugs I tried removing more of them, targeting those places where a cast was used to force a conversion from CFX_WideString to FX_LPCWSTR, replacing these casts with calls to the newly added .c_str() function. This revealed two places where the cast was hiding a bug -- where ->c_str() was required instead! This removes ~33 FX_LPCWSTR casts and there are ~31 left, many of which will go away in some future change. Also includes this change: Removing unnecessary casts from wchar_t* to wchar_t*, by various names. Original patch from Bruce Dawson(brucedawson@chromium.org) TBR=bo_xu@foxitsoftware.com, tsepez@chromium.org Review URL: https://codereview.chromium.org/811593007
2014-12-23XFA: merge patch from CL 727083002, zero local variables.Bruce Dawson
Zero initialize ch to avoid possible bug - conditions are very subtle. Whether ch and iRet are read without being initialized depends on complex preconditions and cannot be determined by looking at these function. Therefore it seems prudent to zero initialize them to avoid any risk. BUG=427616 TBR=bo_xu@foxitsoftware.com Review URL: https://codereview.chromium.org/727083002 Review URL: https://codereview.chromium.org/793763005
2014-11-17Merge to XFA: patch from CL 730993002Bo Xu
2014-11-14Merge to XFA: Patch from CL 726143002Bo Xu
BUG=https://code.google.com/p/pdfium/issues/detail?id=78 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/726143002
2014-11-03Merge XFA to PDFium master at 4dc95e7 on 10/28/2014Bo Xu
2014-09-19Fix a bug when assign the generation number of indirect objectschromium/2166chromium/2165Bo Xu
BUG=408532 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/524443002
2014-08-13Add FX_OVERRIDE and use it for virtual functions of FX_FINAL classes.Tom Sepez
Should there be cases where this fails to compile, it indicates a mistake, either an incorrectly declared overrriden virtual method, or a method that should be declared non-virtual. The only issues were with CPDF_CustomAccess::GetBlock(), CPDF_CustomAccess::GetByte(), and CPDF_CustomAccess::GetFullPath(). These don't appear to be used anywhere, and are removed. Two members are removed that are no longer needed once those methods are removed. R=jam@chromium.org, jun_fang@foxitsoftware.com Review URL: https://codereview.chromium.org/454983003
2014-08-07Change '>=' back to '>' in extension.h due to bad fixchromium/2122chromium/2121chromium/2120chromium/2119chromium/2118Jun Fang
BUG=400662 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/445303002
2014-07-31Correct the names of the FX_SAFE_* typedefs.Chris Palmer
R=jun_fang@foxitsoftware.com Review URL: https://codereview.chromium.org/417263008
2014-07-30Fix the potential integer overflow from 'offset+size' in extension.h and ↵JUN FANG
fpdfview.cpp BUG=397258 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/419063002
2014-07-29Remove a few unused variables, functions, and tables.Nico Weber
Found by clang's -Wunused-variable, -Wunused-function, -Wunused-const-variable. BUG=none R=bo_xu@foxitsoftware.com Review URL: https://codereview.chromium.org/404653005
2014-07-24CalRGB color correctionBo Xu
BUG=pdfium:19 R=thestig@chromium.org Review URL: https://codereview.chromium.org/403163002