Age | Commit message (Collapse) | Author |
|
Or initialize members in the header. Also make m_dwFileLen member const.
Change-Id: Iaaeab9a93e18e4ab313437362c0012d729b01647
Reviewed-on: https://pdfium-review.googlesource.com/9970
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
The original fix to https://crbug.com/641333 was too strict. Relax the
checks and use a std::tuple for the path map key, instead of trying to
"hash" a key.
BUG=chromium:788864
Change-Id: I6e6a96691bce2834c2e95baa16ebd39e6aa03140
Reviewed-on: https://pdfium-review.googlesource.com/19950
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
In this CL we prevent integer overflow by checking that the integers are
in the appropriate range before casting from unsigned to signed.
Bug: 789524
Change-Id: I41572849f18ffb0f0739c80130ee6b5061845d29
Reviewed-on: https://pdfium-review.googlesource.com/20011
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Nicolás Peña Moreno <npm@chromium.org>
|
|
See the bugs and cxx post for justification and details:
https://groups.google.com/a/chromium.org/forum/#!topic/cxx/RkOHzIK6Tq8
This change was done using clang-tidy as described here:
https://chromium.googlesource.com/chromium/src/+/lkcr/docs/clang_tidy.md
Bug: chromium:776257
Change-Id: Iebab34f3ee97a6249e4517d1f5dec1971c36fcba
Reviewed-on: https://pdfium-review.googlesource.com/19973
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
See the bugs and cxx post for justification and details:
https://groups.google.com/a/chromium.org/forum/#!topic/cxx/RkOHzIK6Tq8
This change was done using clang-tidy as described here:
https://chromium.googlesource.com/chromium/src/+/lkcr/docs/clang_tidy.md
Bug: chromium:778942
Change-Id: I5d94299404647d231c0dc8ef8b75a6c0539f378c
Reviewed-on: https://pdfium-review.googlesource.com/19972
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
CJS_PublicMethods.
Build fails on GCC because JSGlobalFunc (a global function) is calling private
methods of CJS_PublicMethods.
Bug: None.
Change-Id: I56f0313e250787d044613066abf069f741501415
Reviewed-on: https://pdfium-review.googlesource.com/19750
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
LG Electronics has signed the corporate CLA.
Bug: None
Change-Id: Idb5fd065439eaf5ef6d15d21adcaefc22cbd0cd6
Reviewed-on: https://pdfium-review.googlesource.com/19910
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
See the bugs and cxx post for justification and details:
https://groups.google.com/a/chromium.org/forum/#!topic/cxx/RkOHzIK6Tq8
This change was done using clang-tidy as described here:
https://chromium.googlesource.com/chromium/src/+/lkcr/docs/clang_tidy.md
Bug: chromium:778955
Change-Id: Ib037ed749539e4380fb336fc6fa85648fc506118
Reviewed-on: https://pdfium-review.googlesource.com/19990
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
See the bugs and cxx post for justification and details:
https://groups.google.com/a/chromium.org/forum/#!topic/cxx/RkOHzIK6Tq8
This change was done using clang-tidy as described here:
https://chromium.googlesource.com/chromium/src/+/lkcr/docs/clang_tidy.md
Bug: chromium:776257
Change-Id: I1f6637cde8b3e41825993a736bed6763dd7beacb
Reviewed-on: https://pdfium-review.googlesource.com/19971
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
See the bugs and cxx post for justification and details:
https://groups.google.com/a/chromium.org/forum/#!topic/cxx/RkOHzIK6Tq8
This change was done using clang-tidy as described here:
https://chromium.googlesource.com/chromium/src/+/lkcr/docs/clang_tidy.md
In some cases the the tool leaves behind a string of commas where it
replaced a member initializer list
(https://bugs.llvm.org/show_bug.cgi?id=35051). They were cleaned up
with:
git diff --name-only | \
xargs sed -E -i 's/(^\s*|\)\s*):[ ,]*= default/\1 = default/'
Bug: chromium:778959, chromium:778957
Change-Id: I23e60d3d6c8bc9e8574d425710a0441cb5510d6b
Reviewed-on: https://pdfium-review.googlesource.com/19970
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
CFX_DIBitmap::Create does an allocation of size roughly 4*width*height
even in xfa_codec_fuzzer.h. This CL fixes the memory limit accordingly.
Bug: 789359
Change-Id: Ib5cbd08510ecacb2fbd22cb23394d24a86110bc5
Reviewed-on: https://pdfium-review.googlesource.com/19890
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Nicolás Peña Moreno <npm@chromium.org>
|
|
Bug:
Change-Id: I0c930ca30637f58af3b60ed8f1383bd9234a1723
Reviewed-on: https://pdfium-review.googlesource.com/19850
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
Found by GCC.
Change-Id: Ia403c21b1906ba6782b5a763c67a19a56de01716
Reviewed-on: https://pdfium-review.googlesource.com/19810
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Bug: pdfium:774
Change-Id: I2056583c270f1bb0046250ce2ec53a2cbe46b893
Reviewed-on: https://pdfium-review.googlesource.com/19672
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
We never use the ::Angle unit internally, we just access the value. This
CL changes the default value to an Integer and drops the measurement.
Change-Id: I85d6d84956595bb0576db42d287f54a5a3db1bed
Reviewed-on: https://pdfium-review.googlesource.com/19790
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: I73b6a477c1a66beec2b73072f23faab7db7d3342
Reviewed-on: https://pdfium-review.googlesource.com/18513
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
Use more variables to avoid redundant calculations. Add one more edge
test case.
Change-Id: I6c8a0aca9de3bdd1a394c39304fd9a75009f9489
Reviewed-on: https://pdfium-review.googlesource.com/19690
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
This CL removes the static initialized CXFA_Measurement items and
replaces them with strings which are converted to measurements at
runtime.
Bug: pdfium:804
Change-Id: I60422b6ddff750d504a5a8b62de6ad896fc80caf
Reviewed-on: https://pdfium-review.googlesource.com/19770
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL removes some useless structs from CFX_CTTGSUBTable.
Change-Id: Iaf8b58d70b36d77fea73946c6b4279b15f5726e8
Reviewed-on: https://pdfium-review.googlesource.com/19710
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Nicolás Peña Moreno <npm@chromium.org>
|
|
This reverts commit 7829b7048d5cf13a4f1a806fed57f2440d1b5dec.
Reason for revert: Breaking the waterfall build. Looks like it's finding a leak it wasn't before?
https://build.chromium.org/p/client.pdfium/builders/linux_xfa_asan_lsan/builds/2376/steps/embeddertests/logs/stdio
Original change's description:
> [CFI] Enable type generalization for LCMS
>
> Control Flow Integrity [1] indirect call checking verifies that function
> pointers only call valid functions with a matching type signature. This
> condition can be too strict, a common form of 'abstraction' relies on
> function pointers being cast to generalize argument pointer types to
> void*.
>
> In LCMS these failures occur because of casts of function pointers called
> as both _cmsInterpFn16 (cmsInterpFunction.Lerp16) and _cmsOPTeval16Fn (as
> an argument to _cmsPipelineSetOptimizationParameters) types making it
> difficult to refactor out easily. Instead, enabling the type
> generalization build config weakens the type checking performed for
> CFI-icall to accomodate this common type of casts.
>
> [1] https://www.chromium.org/developers/testing/control-flow-integrity
>
> Bug: 785442
> Change-Id: Ib42fb1b4e152d5042b170698c2707ebb9e0cc1ee
> Reviewed-on: https://pdfium-review.googlesource.com/19250
> Commit-Queue: dsinclair <dsinclair@chromium.org>
> Reviewed-by: dsinclair <dsinclair@chromium.org>
TBR=tsepez@chromium.org,dsinclair@chromium.org,vtsyrklevich@chromium.org
Change-Id: Ib9c26eb017733d2bf02035415221475bfbfe55c9
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 785442
Reviewed-on: https://pdfium-review.googlesource.com/19730
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Control Flow Integrity [1] indirect call checking verifies that function
pointers only call valid functions with a matching type signature. This
condition can be too strict, a common form of 'abstraction' relies on
function pointers being cast to generalize argument pointer types to
void*.
In LCMS these failures occur because of casts of function pointers called
as both _cmsInterpFn16 (cmsInterpFunction.Lerp16) and _cmsOPTeval16Fn (as
an argument to _cmsPipelineSetOptimizationParameters) types making it
difficult to refactor out easily. Instead, enabling the type
generalization build config weakens the type checking performed for
CFI-icall to accomodate this common type of casts.
[1] https://www.chromium.org/developers/testing/control-flow-integrity
Bug: 785442
Change-Id: Ib42fb1b4e152d5042b170698c2707ebb9e0cc1ee
Reviewed-on: https://pdfium-review.googlesource.com/19250
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Bug: pdfium:774
Change-Id: Id13f051bdab8970d469b51a48b1946b6dc86d7dd
Reviewed-on: https://pdfium-review.googlesource.com/19631
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Bug: pdfium:774
Change-Id: Ie733da2852d2721ef8007aa55d32ffa9537efb70
Reviewed-on: https://pdfium-review.googlesource.com/19630
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Bug: pdfium:774
Change-Id: Id993864c4ae009e686c62e7be13e2db5d8cb4170
Reviewed-on: https://pdfium-review.googlesource.com/19572
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Bug: pdfium:774
Change-Id: Ie7674ac55dea6284a0d974cef107ef357197a06b
Reviewed-on: https://pdfium-review.googlesource.com/19610
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
Most of the API methods FPDFText operate on indices in terms of the
underlying stream of characters. This stream includes non-printing
control characters, which are not part of the visible text. The
majority of files do not appear to have these hidden characters so
there is a 1:1 correspondence between them. When they are present
conversion needs to occur to make sure that GetText doesn't attempt to
retrieve for a span that is out of range.
BUG=chromium:788103,chromium:788220
Change-Id: I4c9fa403ea65754ba94e3f15ded49fe0641e9db5
Reviewed-on: https://pdfium-review.googlesource.com/19550
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
When accessing the margin data for a widget, the Inset values can come
back as empty optionals. Those would only get values if there was a
border data node present. If there is no border data node, we need to
default the optional value.
Bug: chromium:788246
Change-Id: Id3d5b76e8dc9d391aaa0d0440bf6ee2e2636fcdc
Reviewed-on: https://pdfium-review.googlesource.com/19671
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
When walking the Node name list, we need to verify the element returned
is not the end element, not just if the element is not null.
Bug: chromium:789113
Change-Id: I04c33a8f2066891e6031035e469c677c404fd724
Reviewed-on: https://pdfium-review.googlesource.com/19670
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL reduces the memory limit in pdf_codec_jbig2_fuzzer. Note that
MSAN requires the limit to be lower than the actual bot usage limit.
In the testcase, we get OOM just after CFX_DIBitmap::Create.
It also increases the limit in xfa_codec_fuzzer.h
Bug: 784155
Change-Id: I6fc8d9533ca7dc2b19bf84b9eac23284e05b1e6d
Reviewed-on: https://pdfium-review.googlesource.com/19571
Commit-Queue: Nicolás Peña Moreno <npm@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
This CL makes the helper methods 'ConvertBuffer_'* in CFX_DIBSource void
since they always succeed.
Change-Id: I55dd714bec5ccc3695cd0bbebcf978d767acc53a
Reviewed-on: https://pdfium-review.googlesource.com/19650
Commit-Queue: Nicolás Peña Moreno <npm@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
This CL removes the CollectionSize and updates call locations as needed.
Bug: pdfium:774
Change-Id: I813c500b3a17a194407ceb1304252b9b16fe1779
Reviewed-on: https://pdfium-review.googlesource.com/19590
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
This CL adds helpers to CXFA_Node to get the type of an attribute and
the default value for a given attribute.
Change-Id: I8bf41f568fe1da650fb3df4232b63d2e48038e07
Reviewed-on: https://pdfium-review.googlesource.com/19330
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL removes the xfa_utils helper and does the work directly in
CXFA_Node.
Change-Id: I4f7cac9cb6d2a53ac5627f50a2f066f79fc22a31
Reviewed-on: https://pdfium-review.googlesource.com/19290
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL removes the use of CollectionSize from CPDF_StructTree and uses
size_t in the callers.
Bug: pdfium:774
Change-Id: I860a51a533642c949c497ca26e74ba064a8aa9ba
Reviewed-on: https://pdfium-review.googlesource.com/19530
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
BUG=chromium:788103
Change-Id: I8ebdbc78eb14c358d7ac019b96de4828e6071b79
Reviewed-on: https://pdfium-review.googlesource.com/19350
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
In this CL, we do some nit cleanup and change many var++ to ++var in
CFX_DIBSource.
Change-Id: I2379e6e15688cbde68415adc47b01114ad0785c1
Reviewed-on: https://pdfium-review.googlesource.com/19570
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Nicolás Peña Moreno <npm@chromium.org>
|
|
This CL changes CountKids to not used CollectionSize and returns size_t
directly. Callers updated as needed.
Bug: pdfium:774
Change-Id: I8862218e62cd13be9473fa8116afd29cd3afde04
Reviewed-on: https://pdfium-review.googlesource.com/19510
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Bug: pdfium:774
Change-Id: I4996f5526884c33d92df964045bd5467c392df5e
Reviewed-on: https://pdfium-review.googlesource.com/19490
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Bug: pdfium:774
Change-Id: I7ebbcb17374b4117f92b94edbd8bcba18efe6313
Reviewed-on: https://pdfium-review.googlesource.com/19470
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Bug: pdfium:774
Change-Id: I3fcde6fba46d21affa63d79fab2d83f47c9c5f84
Reviewed-on: https://pdfium-review.googlesource.com/19450
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL updates various methods in CPDF_TextObject to return or received
size_t values. Callers have been updated as needed.
Bug: pdfium:774
Change-Id: Id72511bc74637c6261add39f5414c9a4b8390b82
Reviewed-on: https://pdfium-review.googlesource.com/19430
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
This CL updates the various call sites to use size_t instead of other
types.
Bug: pdfium:774
Change-Id: Id8b75728b61c0ca1b15bc815831c885d33374f7b
Reviewed-on: https://pdfium-review.googlesource.com/19410
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
This CL adds helpers to CXFA_Node to convert from strings to attributes
and from attributes to their string names. A static_assert was added to
make sure the list of attributes is the same size as the attribute data
so the checks can be removed.
Change-Id: Idebc65021d71f604bcf498e4cf42252af00d802b
Reviewed-on: https://pdfium-review.googlesource.com/19270
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Bug: pdfium:774
Change-Id: Ie24d0741f8c8d7988166aeb4b9ce87491993d30c
Reviewed-on: https://pdfium-review.googlesource.com/19390
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
This CL adds concrete classes for each of the XFA Node types.
Change-Id: Ieac8e2fcd5d13c61daa27fc63e3d80abb7aa7a29
Reviewed-on: https://pdfium-review.googlesource.com/18271
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
https://chromium.googlesource.com/chromium/src/third_party/freetype2.git/+log/8f5568bfc4fd..bec14f688925
$ git log 8f5568bfc..bec14f688 --date=short --no-merges --format='%ad %ae %s'
2017-11-22 ewaldhew * src/psaux/psft.c (cf2_setGlyphWidth): Check format before setting.
2017-11-22 ewaldhew [psaux] Fix CFF advance widths. (#52466)
2017-11-15 vtsyrklevich * include/freetype/ftrender.h: Fix `FT_Renderer_RenderFunc' type.
2017-11-14 madigens Use Adobe hinting engine for `light' hinting of both CFF and Type 1.
2017-11-09 yuri_levchenko * CMakeLists.txt: Add `DISABLE_FORCE_DEBUG_PREFIX' option.
Created with:
roll-dep pdfium/third_party/freetype/src
R=dsinclair@chromium.org,npm@chromium.org,thestig@chromium.org
Bug: pdfium:941
Change-Id: I00579a3e26d9cabce7032e0b538de95a1029bac7
Reviewed-on: https://pdfium-review.googlesource.com/19310
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Nicolás Peña Moreno <npm@chromium.org>
|
|
This CL cleans up return values, out-params and changes simple methods
to boolean checks where possible in CXFA_WidgetData.
Change-Id: I29daa67993730f3e9d61cb6fdf918a886cc9120e
Reviewed-on: https://pdfium-review.googlesource.com/19230
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
We never use ::GetAccess to get the value in general, just to see if
it's set to Open or not. This CL makes the usage clearer.
Change-Id: I0e978a8b8e642c7441ab2ceb8062f672ceea7d55
Reviewed-on: https://pdfium-review.googlesource.com/19210
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
This CL makes the methods const and uses return values instead of
out-params.
Change-Id: If760cd8c10d8f3a94dd3e13c46200cb6738a4d5a
Reviewed-on: https://pdfium-review.googlesource.com/19150
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
This CL removes out-params in favour of returns; Makes params const;
Cleans up return types.
Change-Id: I2b7c237130a99859b08af0486a95b4c6f6974f62
Reviewed-on: https://pdfium-review.googlesource.com/19130
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|