Age | Commit message (Collapse) | Author |
|
This CL removes unreachable code and also removes the flag
Icc_Format_DEFAULT which becomes unused.
Bug: chromium:346399
Change-Id: I1cdd0f70ffec2abcd20ddf5b181273971b92ecaa
Reviewed-on: https://pdfium-review.googlesource.com/14850
Commit-Queue: Nico Weber <thakis@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
|
|
This CL renames the FX_OS defines to have _OS_ in their names and drops
the _DESKTOP suffix. The FXM defines have been changed to just FX.
Change-Id: Iab172fba541713b5f6d14fb8098baf68e3364c74
Reviewed-on: https://pdfium-review.googlesource.com/14833
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
The _FX_IOS_ define is never defined, so it isn't useful to check
_FX_OS_ against. Remove.
Change-Id: I90b50a1a0dc165073ed223cbfe861b9a227818dd
Reviewed-on: https://pdfium-review.googlesource.com/14831
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Several of the OS checks were mis-typed as FX_WIN64 instead of
FX_WIN64_DESKTOP. This CL updates the defines to check for the correct
OS define.
Bug: pdfium:906
Change-Id: Ib58a6472d1bc26c34d509edf32ac00b18d852a3b
Reviewed-on: https://pdfium-review.googlesource.com/14813
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
Previous implementation assumed that if the local colour palette was
not specified and the global palette had its size specified, then use
the global. If the global palette is disable, it will not have data,
but it may have a size. Technically the size is giberish in this case,
but the value is allowed to be non-zero, so isn't a sufficient check.
BUG=chromium:768089
Change-Id: Iaec15fcd65f3983056df7d56d29118a516334cd9
Reviewed-on: https://pdfium-review.googlesource.com/14819
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
|
|
CGifLZWDecoder has been moved out into its own file, name changed to
CFX_LZWDecoder, member variable names updated, creation pattern
changed, and unit tests added.
Wrt the creation pattern, there is no longer a constructor and 2
initialization methods that need to be called. Instead all of the
initialization is done as part of the constructor. A wrapper has been
added for generating a std::unique_ptr<CFX_LZWDecoder>, so that params
can be validated.
BUG=pdfium:900,pdfium:901,pdfium:903,pdfium:904
Change-Id: Idcbe773f7fb18b08e64d5a89bfd87d4801332c53
Reviewed-on: https://pdfium-review.googlesource.com/14814
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
|
|
The CFX_SizeGlyphCache is only used internally by the CFX_FaceCache.
This CL moves the definition to that file and removes fx_text_int.h
Change-Id: I38f26f437f0eaa72492995ae7442d5c38ed2f229
Reviewed-on: https://pdfium-review.googlesource.com/14771
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
The CFX_UniqueKeyGen struct is only used in cfx_facecache.cpp. This CL
moves the struct to the anonymous namespace of that file.
Change-Id: I1ec85126070e2e0446abc5639cea8465cb490f1a
Reviewed-on: https://pdfium-review.googlesource.com/14770
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
There are a number of functions in fx_gix.h/.cpp that take in a
pointer to a CGifContext as their first parameter. Moving these to be
methods in that class.
BUG=pdfium:902
Change-Id: I8c583ab9e42dda4241aa8a6f865408a94fa6d273
Reviewed-on: https://pdfium-review.googlesource.com/14670
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
The core fix in this CL is a change to how LWZ decompression works, so
that when the min code table size and the color palette size are
different, color codes after the end of the defined color palette are
considered errors.
This CL also introduces a bunch of tweaks to the call return path,
since there were multiple locations where the GIF decode failing
status was being dropped on the floor, so the end widget would have a
bitmap with the default colour in it, instead of nothing.
BUG=chromium:616671
Change-Id: Id6f40d552dc24650c91e9903f710ff2fa63bc774
Reviewed-on: https://pdfium-review.googlesource.com/14630
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: Ia8fd1893f862391fbada396f505ac16985b59cd6
Reviewed-on: https://pdfium-review.googlesource.com/12850
Commit-Queue: Art Snake <art-snake@yandex-team.ru>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
This CL renames CFX_WeakPtr to WeakPtr and moves into the fxcrt
namespace.
Bug: pdfium:898
Change-Id: Ide50a8afeb1e987c48c8fbd103898745c9199d6a
Reviewed-on: https://pdfium-review.googlesource.com/14621
Commit-Queue: dsinclair <dsinclair@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
This CL moves CFX_UnownedPtr to UnownedPtr and places in the fxcrt
namespace.
Bug: pdfium:898
Change-Id: I6d1fa463f365e5cb3aafa8c8a7a5f7eff62ed8e0
Reviewed-on: https://pdfium-review.googlesource.com/14620
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL moves CFX_StringPoolTemplate to StringPoolTemplate and places in
the fxcrt namespace.
Bug: pdfium:898
Change-Id: I41c8f23d6ad814d65cd154092143efaa630a96d1
Reviewed-on: https://pdfium-review.googlesource.com/14619
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL renames CFX_StringDataTemplate to StringDataTemplate and moves
into the fxcrt namespace.
Bug: pdfium:898
Change-Id: I1c1e5ae674c3cca34fd595272e9eebc9346ed6ac
Reviewed-on: https://pdfium-review.googlesource.com/14618
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL renames CFX_SharedCopyOnWrite to SharedCopyOnWrite and moves to
the fxcrt namespace.
Bug: pdfium:898
Change-Id: Iced796b9f341407720e2a88f11d1916df56fe68c
Reviewed-on: https://pdfium-review.googlesource.com/14617
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
This CL renames CFX_RetainPtr to RetainPtr and places in the fxcrt
namespace.
Bug: pdfium:898
Change-Id: I8798a9f79cb0840d3f037e8d04937cedd742914e
Reviewed-on: https://pdfium-review.googlesource.com/14616
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL renames CFX_Observable to Observable and moves into the fxcrt
namespace.
The test suite names were updated to ObservedPtr from fxcrt.
Bug: pdfium:898
Change-Id: Ia507482bc0a1d6d8bbf12c0c55c4a88f6c8910e2
Reviewed-on: https://pdfium-review.googlesource.com/14615
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL moves CFX_MaybeOwned into the fxcrt namespace and removes the
CFX_ prefix.
The test names for maybe owned were updated to be in the MaybeOned test
suite instead of the fxcrt suite.
Bug: pdfium:898
Change-Id: I0c07057d66c8610e7b19133094b4507fff725e76
Reviewed-on: https://pdfium-review.googlesource.com/14470
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
This CL renames CFX_AutoRestorer to just AutoRestorer and places in the
fxcrt namespace.
Bug: pdfium:898
Change-Id: Id9f36df94e95f3b2a55054bc198ca1bfd249ee3d
Reviewed-on: https://pdfium-review.googlesource.com/14450
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
When working with LineTo and BezierTo commands, verify we are within the
bounds of the path data before accessing elements.
Bug: pdfium:899
Change-Id: Iae9f9f3d0e5dbaf8d5452b86961ab8c79a6210f1
Reviewed-on: https://pdfium-review.googlesource.com/14490
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Then set up the right dependencies for them.
BUG=chromium:765914
Change-Id: I036cd888c741927d5efe0d020c6676f169e7cbb1
Reviewed-on: https://pdfium-review.googlesource.com/14410
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: I020b862619f3f93f71dbb027b9e799d78744f686
Reviewed-on: https://pdfium-review.googlesource.com/14391
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: Icacf877e2b66ca7d49637dcf9eaec0f99bcdd8bb
Reviewed-on: https://pdfium-review.googlesource.com/14390
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: I703321108712e8c4a11a8343ecf8b1a8804c1d1a
Reviewed-on: https://pdfium-review.googlesource.com/14352
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Change-Id: I9ecf08c5cabfeb7b354abeb46b94918ae0b4539a
Reviewed-on: https://pdfium-review.googlesource.com/13590
Commit-Queue: Art Snake <art-snake@yandex-team.ru>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: Ie1170e71fb2d8f87857e68620f27e478a0801d21
Reviewed-on: https://pdfium-review.googlesource.com/13670
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Art Snake <art-snake@yandex-team.ru>
|
|
Change-Id: I416e636d90c63679e2dd0b109c6594fc02663c89
Reviewed-on: https://pdfium-review.googlesource.com/13572
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Art Snake <art-snake@yandex-team.ru>
|
|
Change-Id: Idbde2714eb5a3fd5a76c77ce968f790f3c5dfa07
Reviewed-on: https://pdfium-review.googlesource.com/13571
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Art Snake <art-snake@yandex-team.ru>
|
|
Change-Id: I5c0fccc74a9f103d91c95fd72dc6683d991eadec
Reviewed-on: https://pdfium-review.googlesource.com/13570
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Art Snake <art-snake@yandex-team.ru>
|
|
Automated using git grep & sed.
Replace StringC classes with StringView classes.
Remove the CFX_ prefix and put string classes in fxcrt namespace.
Change AsStringC() to AsStringView().
Rename tests from TEST(fxcrt, *String*Foo) to TEST(*String*,
Foo).
Couple of tests needed to have their names regularlized.
BUG=pdfium:894
Change-Id: I7ca038685c8d803795f3ed02545124f7a224c83d
Reviewed-on: https://pdfium-review.googlesource.com/14151
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
|
|
Change-Id: I87b5e6cefe973b82b4868e56fc5285c95c53a12b
Reviewed-on: https://pdfium-review.googlesource.com/12550
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
Now considering anything not representable by a 32-bit signed int
as OOB rather than decoding some arbitrary overflowed value.
Bug: chromium:761666
Change-Id: I00f5a3abadca51f9bedc5e5d78f7f184040c2f33
Reviewed-on: https://pdfium-review.googlesource.com/14010
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
Due to some of the size parameters for allocating space in Decode()
depending on the values produced by opj_decode(), this change was
causing misallocation of space, which in turn was causing illegal
reads/writes.
The issue with excessive memory usage that the original CL was trying
to change is less significant than the above mentioned problems, so
reverting this fix and looking for another solution to the
problem. This will re-open bugs https://crbug.com/754423 and
https://crbug.com/761005.
BUG=chromium:764177,chromium:754423,chromium:761005
Change-Id: I1cafac8a8117ec1e3bc32b31196bdec719d46477
Reviewed-on: https://pdfium-review.googlesource.com/13950
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
This CL changes the behavior of FPDF_RenderPageBitmapWithMatrix so it
transforms the bitmap. Before, the page would be transformed and the
assumption was that it would be drawn on a bitmap with the same
dimensions as the original page. This does not work well because a
transformation generally changes the dimensions of the page. The
rectangles test is modified to include small rectangles in the corner
of the page, so that it's clear that the whole original page is being
displayed.
Bug: pdfium:849
Change-Id: Ie89f959a1605fea59a15d239ca871ccd939ec92b
Reviewed-on: https://pdfium-review.googlesource.com/13510
Commit-Queue: Nicolás Peña <npm@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
Reverse iteration with signed lengths and indices is kinda icky
without this abstraction, and STL provides this pretty much "for
free" given the existing forward iterator.
Change-Id: I97c36c8bd23c0aa48195bc17da7c672292b4cde2
Reviewed-on: https://pdfium-review.googlesource.com/13770
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Change-Id: I2a750c8e46b68dc4870e2dadd2ed3429008e1562
Reviewed-on: https://pdfium-review.googlesource.com/13551
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
The existing code did end of range checks by making sure that the
value was never less then 0. This isn't correct when using an unsigned
type, since 0 - 1 will wrap around to the max possible value, and
thus still be less then 0. Additionally the existing code was hard to
follow due to the complexity of some of the low level operations being
performed.
It has been rewritten using higher level string operations to make it
clearer and correct.
BUG=chromium:763256
Change-Id: Ib8bf5ca0e29e73724c4a1c4781362e8a8fc30149
Reviewed-on: https://pdfium-review.googlesource.com/13690
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Speculative fix for bug. Also remove FX_VA_COPY as va_copy should
be fine on all ports nowdays (we think).
Bug: 763965
Change-Id: I5c321d5624d00b3b2f262ec599e4382f02b744ff
Reviewed-on: https://pdfium-review.googlesource.com/13790
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
When reading a stream, if it is encrypted using an AES cipher it must
be atleast 16 bytes long aka 128 bits, other wise it is malformed.
BUG=chromium:763585
Change-Id: Ied7c36978f1eb24aeda93a184527b6d6a191e5c3
Reviewed-on: https://pdfium-review.googlesource.com/13751
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
|
|
BUG=chromium:761005
Change-Id: I538e49f1eeb32891b33677d8587d2bed110b1fc1
Reviewed-on: https://pdfium-review.googlesource.com/13692
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
|
|
This patch was authored by Ke Liu of Tencent's Xuanwu Lab.
BUG=762374
Change-Id: Icb3ee98fb4c399b871ccf11e9920af7caf51be11
Reviewed-on: https://pdfium-review.googlesource.com/13610
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Chris Palmer <palmer@chromium.org>
|
|
BUG=chromium:762106
Change-Id: I714d69320cc4fb81d535f811c18d4ef91fec44d3
Reviewed-on: https://pdfium-review.googlesource.com/13212
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Take seed generation logic from base's address_space_randomization.cc.
One small tweak is to avoid the bottom three bits of a stack address and
invert, to make leaking ASLR more difficult along the lines of the
freelist masking in base's partition allocator. Another tweak is to
mix in some more time-based information. Another tweak is to add in
the times called so that rapid successive calls return different results.
Bug: pdfium:891
Change-Id: I14238da15cee9c8d4ca72d79e4f7fbb26997c619
Reviewed-on: https://pdfium-review.googlesource.com/13490
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
In the existing implementation of the JPX decoder, Init extracts the
header from the image and then immediately decompresses it. This is
problematic if it is a very large image that we won't be able to
allocate a bitmap for. The code has been changed to instead delay
decompression until the Decode method, since things like dest Bitmap
generation can be performed using just the header information.
There is also a bit of renaming/casting cleanup, because I was having
a hard time parsing what was a local vs member variable.
BUG=chromium:761005
Change-Id: I55a55c0be2f88a5352a6ca056c2a816137d7c749
Reviewed-on: https://pdfium-review.googlesource.com/13550
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
|
|
R=dsinclair@chromium.org
Bug:
Change-Id: I34f9498f4e5942c5b10ab2848509de935882321d
Reviewed-on: https://pdfium-review.googlesource.com/13470
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
Change-Id: I92c0bd417d9c5be59c36401efae89406e482756a
Reviewed-on: https://pdfium-review.googlesource.com/12650
Commit-Queue: Art Snake <art-snake@yandex-team.ru>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Use CPDF_SyntaxParser::ToNextWord to move position on word start.
Change-Id: I6b63efc9027b2a4eb4749561bf8ce2b95527d03b
Reviewed-on: https://pdfium-review.googlesource.com/12830
Commit-Queue: Art Snake <art-snake@yandex-team.ru>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
This enables MSVC by default on Windows again, so fix code that fail
to build with MSVC too.
Change-Id: I03fb4e3697ad777a4dca88af462b35526d6c1d4d
Reviewed-on: https://pdfium-review.googlesource.com/13392
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
BUG=pdfium:828
Change-Id: Ifeaf19291ffd33aab63449ab52f8d2606b66c0fc
Reviewed-on: https://pdfium-review.googlesource.com/13330
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
|