Age | Commit message (Collapse) | Author |
|
Use allow_circular_includes_from as a crutch for now.
Change-Id: Ia7a29a268e67b1fe21bed5cdd629e06fb5cc7bfb
Reviewed-on: https://pdfium-review.googlesource.com/c/43992
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
This is a remnant from the old implementation which can get out
of sync with the actual value, esp. in the fuzzers where buffers
are shorter-lived.
Bug: 895009
Change-Id: Ibf16dad58dd750c961e3b446f12cb2197004dbb4
Reviewed-on: https://pdfium-review.googlesource.com/c/44010
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Change-Id: I31a5abb3c8dd31826098493f51effbd5afe109d1
Reviewed-on: https://pdfium-review.googlesource.com/c/41856
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Change-Id: I9b3608bd76ec4911a4bb820fcda62c5d9533fb4f
Reviewed-on: https://pdfium-review.googlesource.com/c/43947
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Also move some implementations out of headers.
Change-Id: I321fc26970c440d874b135bd28e8bc8156b9afee
Reviewed-on: https://pdfium-review.googlesource.com/c/43890
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Change-Id: I773eec2bbf104f073eba7a64ed19f6fba0131d21
Reviewed-on: https://pdfium-review.googlesource.com/c/43946
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
Change-Id: I8060ada299f845a9198a6e83d31d128bd4bf09bc
Reviewed-on: https://pdfium-review.googlesource.com/c/43870
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Instead of manual CHECKs.
Change-Id: I387008bea88cba9b9b3e813631d9fc02ac7eb3a9
Reviewed-on: https://pdfium-review.googlesource.com/c/43932
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Do this by making CFX_CodecMemory actually own the memory that
it is ref-counting. Remove some test cases that are now prohibited,
and relax one lifetime restriction in the test because we are now
doing one additional copy (in the test, but not in real life).
Bug:879512
Change-Id: If030dfcf97fe40155c46a42288fc73192437ce9c
Reviewed-on: https://pdfium-review.googlesource.com/c/43670
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
Rework a memset while we're at it.
Change-Id: Id62ae3a8c1f64a93417915e23fcd93935ae95c73
Reviewed-on: https://pdfium-review.googlesource.com/c/43651
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
Change-Id: I2897feee27f80c85f0328f0b220ae5be93686170
Reviewed-on: https://pdfium-review.googlesource.com/c/43610
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Change-Id: Ib96a66eb47bea791f061e1d6da8aadad8037a99d
Reviewed-on: https://pdfium-review.googlesource.com/c/43609
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Move some method implementations out of headers in the process.
Change-Id: I8701e360d4addd9aec39fe887d932209985d2443
Reviewed-on: https://pdfium-review.googlesource.com/c/43608
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Next step towards making CFX_CodecMemory own the memory it is
ref-counting.
Change-Id: I5922d80d13032c3ea028447c47d34a10234109a3
Reviewed-on: https://pdfium-review.googlesource.com/c/43630
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
We may choose to clean up the memcpy's in a subsequent cl.
Change-Id: I038ae67504b6b3b9c3dbd36e9ddf2600392c2d94
Reviewed-on: https://pdfium-review.googlesource.com/c/43650
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Change-Id: I92aa74c86aef890fcb991f039b9707d680fdb83c
Reviewed-on: https://pdfium-review.googlesource.com/c/43652
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Otherwise code coverage flags the empty body as unreachable.
Change-Id: Iee1d9a876d68276529c70d9b8c7a28276f271767
Reviewed-on: https://pdfium-review.googlesource.com/c/43514
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
- Fix buffer leak if TryRealloc fails.
- Make m_SrcSize always represent the usable bytes in the buffer, even
when read the last partial block from the file.
- Remove redundant comparisons and use std::min().
- Better naming.
Change-Id: Ie7dd79bac21b2f2422f299563a2dd28ed358e3e2
Reviewed-on: https://pdfium-review.googlesource.com/42130
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
Extract some dividends from having landed the previous CL.
Change-Id: I9ade77c801b51762cab801716b9fd2bc4c634036
Reviewed-on: https://pdfium-review.googlesource.com/c/41990
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
This reverts commit 214982c4d02a720c3b1b3de121cddc62189b8848.
Reason for revert: Turns out it is reachable.
Original change's description:
> Remove unreachable code in CPDF_DIBBase.
>
> The colorspace is always available when creating image decoders that use
> colorspaces.
>
> Change-Id: I20ac75edcd614ccc1e83de262c128776e9d03eed
> Reviewed-on: https://pdfium-review.googlesource.com/42872
> Commit-Queue: Ryan Harrison <rharrison@chromium.org>
> Reviewed-by: Ryan Harrison <rharrison@chromium.org>
TBR=thestig@chromium.org,rharrison@chromium.org
BUG=chromium:888743
# Not skipping CQ checks because original CL landed > 1 day ago.
Change-Id: I45903543f0e4bf2785660fb8c1e45c34febb6ecf
Reviewed-on: https://pdfium-review.googlesource.com/43050
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Because I nearly botched this trivial calculation in the previous CL.
Change-Id: I7438f9d3476d93b7899c2d7d761234769f53f9e3
Reviewed-on: https://pdfium-review.googlesource.com/43010
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
Another step before trying to fix the memory issue. Forces common
APIs on the bunch of decoders, though some methods are unused.
Requires adding some arguments/return values to get to a common
API which are not used in all cases (yet?). Required converting
some args to spans. Required proxying a GetJumpMark() call through
the public module API to the private context.
Bug: pdfium:1082
Change-Id: I0c0b7415141ff2a6f4f44777ca3d05521f08130d
Reviewed-on: https://pdfium-review.googlesource.com/41950
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
This CL moves FaxG4Decode to the class where it's implemented. It should
remain there because it calls FaxG4GetRow, declared and used in the cpp
file. Do some ++ cleanup while at it.
This CL also makes CCodec_FaxModule own some methods that were
namespaced since doing so allows removing a bunch of parameters.
Change-Id: I24787f5668c7273b9bdb4009c3d0b29590c5552f
Reviewed-on: https://pdfium-review.googlesource.com/42950
Commit-Queue: Nicolás Peña Moreno <npm@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
The colorspace is always available when creating image decoders that use
colorspaces.
Change-Id: I20ac75edcd614ccc1e83de262c128776e9d03eed
Reviewed-on: https://pdfium-review.googlesource.com/42872
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
Also remove dead code found along the way, and fix lint errors.
BUG=pdfium:410
Change-Id: I4cd0ede516483209cf49a6686d909953ab196106
Reviewed-on: https://pdfium-review.googlesource.com/42771
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Change-Id: I00ce0109251d1231858e87ffc3889abe6937fa26
Reviewed-on: https://pdfium-review.googlesource.com/42811
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: I7010cedee8d17d05b2c37a94d767e6f3a9c48f7d
Reviewed-on: https://pdfium-review.googlesource.com/42790
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Change-Id: I538fd8bf9905be61d2297181bd02a243a01b30db
Reviewed-on: https://pdfium-review.googlesource.com/42607
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
Change-Id: I41535238715926795f5c588dcae0834bf3a789d0
Reviewed-on: https://pdfium-review.googlesource.com/42606
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
For better encapsulation.
Change-Id: Ia6fd8056112d97d672b91a9a521a2978c807060f
Reviewed-on: https://pdfium-review.googlesource.com/42605
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Classes marked |final| should not have |protected| members. In turn,
"private field m_dwEncryptObjNum is not used" warning is produced.
Change-Id: I51a96aca5a5f499381a6764d892962f7f2dc0327
Reviewed-on: https://pdfium-review.googlesource.com/42611
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
An assignment statement accidentally got removed in
https://pdfium-review.googlesource.com/c/pdfium/+/31538.
BUG=chromium:880920
Change-Id: Iaff20bd2484cd8bf6dc6a13cbf444cefbd605b25
Reviewed-on: https://pdfium-review.googlesource.com/42250
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Change-Id: Idb14846e87a8287dd911b0a2f7a32146e86c2af7
Reviewed-on: https://pdfium-review.googlesource.com/41853
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Change-Id: I1dc99831a564e88035c317455411f1eba9aa41c4
Reviewed-on: https://pdfium-review.googlesource.com/41852
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
The whole point of this wrapper method is to disallow partial
reads, so name it accordingly.
No functional change.
Change-Id: Ia2e7ee756192615f399369d5b077b836438befb2
Reviewed-on: https://pdfium-review.googlesource.com/42150
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Small consolidation before trying to fix a memory issue.
Unfortunately, this involves converting a switch -> ifs, since we
no longer dispatch exactly the same.
Change-Id: I7ef61db98cdfbbc983adf21e7b3fe4ef1d2ce869
Reviewed-on: https://pdfium-review.googlesource.com/41830
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Use the preferred idiom of creating a subspan, which makes the
proper checks prior to the copy.
Change-Id: Ia7f25b5760dea5707df66cf421195b23a1ce0ad0
Reviewed-on: https://pdfium-review.googlesource.com/41911
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
It's always passed as nullptr. It's a good thing, too, since it looks
like some of the implementations are returning a wrong pointer.
Add some missing |const|s.
Change-Id: I768048fdfe4cdd1dc838fee26fec18e024e39920
Reviewed-on: https://pdfium-review.googlesource.com/41810
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Change-Id: Iff900bc3e1cd9c9dd6b023230c1feba78759581c
Reviewed-on: https://pdfium-review.googlesource.com/41710
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
The associated bug is caused by failure to clean up context before
returing at line 740 or so. But cleanups are fragile, so instead
do not move context out of a local until success. This in turn
means passing the local to one helper rather that using the stored
value and confirming this is the only helper method invoked during
the time in which the context is not yet stored.
Bug: 879025
Change-Id: I1acb438edc28f7f4dd8acccc2461fe3a5ea7f5c8
Reviewed-on: https://pdfium-review.googlesource.com/41670
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Change-Id: Ib0a2bd21fe4304163cf9c080e07475e7c033c299
Reviewed-on: https://pdfium-review.googlesource.com/41570
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
Change-Id: Ie344bb37abf7dde158d03cc2897dca3588f1a5e3
Reviewed-on: https://pdfium-review.googlesource.com/41550
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Then include headers in the proper order per standards, since
it will no longer trigger a presubmit warning.
Change-Id: I6bb86ac90e8fd9aed30b66dac61726f0dea8222c
Reviewed-on: https://pdfium-review.googlesource.com/41535
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
Also rename .cpp file to match class name and .h file.
Modify some helper functions to operate on spans.
Move some initializations to member declarations.
Change-Id: Ie0889bda91daaef80fae6f5681f8ce068e92453b
Reviewed-on: https://pdfium-review.googlesource.com/41534
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
This requires making some members unique_ptr<> to preserve the
destruction order.
Bug: 877766
Change-Id: I69e0173fdde7e9cd0d24017d6c829b9b9cf600c0
Reviewed-on: https://pdfium-review.googlesource.com/41490
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
Rename .cpp file to match class and .h file (!!!)
Put initialziations into header.
Change-Id: I2cbc7608287f8df887ce186d122dcd3db2aef19b
Reviewed-on: https://pdfium-review.googlesource.com/41511
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
Change-Id: I3dc2dd54d89858722c2aea4b9e694308796b8274
Reviewed-on: https://pdfium-review.googlesource.com/41510
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Then revert the ones that break compilation.
Fix one IWYU noticed during presubmit.
Change-Id: I881a8a72818e55dbc4816247e35ff5e3015194e7
Reviewed-on: https://pdfium-review.googlesource.com/41470
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
It is not a source from which you can get CFX_DIBs, but rather a
base class from which all DIBs inherit.
Do the same thing for the CPDF_DIBSource wrapper class.
Mechanical change apart from adding a one-line comment in cfx_dibbase.h
Change-Id: Id2bde87813ca301d9fafc55ce08d703dfc6a7184
Reviewed-on: https://pdfium-review.googlesource.com/41352
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
There are also small tweaks in tests to ensure strict order of
stack variable lifetimes.
Change-Id: Ic9d5c6a2bdd378b517be627f8e29f725bafdc2ad
Reviewed-on: https://pdfium-review.googlesource.com/41310
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|