Age | Commit message (Collapse) | Author |
|
Use the overloaded << operator, which takes length into account
for StringC types, rather than a raw ptr (which gets promoted into
a std::string resulting in a length call that overflows since
StringCs aren't necessarily nul-terminated).
Bug: 746073
Change-Id: Iffbbff53e12da8741acc7ce54000232cc66d83bc
Reviewed-on: https://pdfium-review.googlesource.com/8150
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
BUG=chromium:738303
Change-Id: If36cdc0f53fc224c0c4c8cf775fd2c916f2d0add
Reviewed-on: https://pdfium-review.googlesource.com/8210
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
This CL adds a method to CFX_FloatRect to get a new deflated rectangle
from a given rectangle.
Change-Id: I781222257c82baf94d5f77deede52fbe4e97c701
Reviewed-on: https://pdfium-review.googlesource.com/7850
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
This CL changes usage of PartitionAlloc in fx_memory to allow null
return value for methods used by external C libraries.
Change-Id: I8e2b5dcfb37e30370606afb9a71a7a1d3a28c097
Reviewed-on: https://pdfium-review.googlesource.com/7770
Commit-Queue: Nicolás Peña <npm@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
This CL moves the ScaleRect method to Scale on CFX_FloatRect and changes it to
operate directly on the rect.
Change-Id: Ie0f91c9319be08c9e2cc81cba2519ebb5f2c35eb
Reviewed-on: https://pdfium-review.googlesource.com/7714
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This method is working on the FloatRect content so move it to CFX_FloatRect.
Change-Id: I60aabf6e3b86aa9acc59f86cff69347ec5fe5033
Reviewed-on: https://pdfium-review.googlesource.com/7712
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Found with this patch:
diff --git a/BUILD.gn b/BUILD.gn
index 83bad1b13..444685f04 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -89,6 +89,8 @@ config("pdfium_core_config") {
"/wd4324",
"/wd4577",
]
+ } else {
+ cflags += [ "-Wshadow" ]
}
}
But renaming the conflicting names is tricky, so done with clang-rename.
Change-Id: Ie959b86e9e82b11b211761b0c73e439e51044de7
Reviewed-on: https://pdfium-review.googlesource.com/7410
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Change-Id: I53da7a36ce8503abd99f2525e8a5b394ee547b47
Reviewed-on: https://pdfium-review.googlesource.com/7353
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
|
|
BUG=pdfium:786
Change-Id: I0779dccb6db0e6ea3933279914153ef7961d9a5b
Reviewed-on: https://pdfium-review.googlesource.com/7152
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
CFX_Matrix::GetInverse is much clearer.
Change-Id: Id10ab1723735332e1a78de853f28415ec3a4d834
Reviewed-on: https://pdfium-review.googlesource.com/7090
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Nicolás Peña <npm@chromium.org>
|
|
BUG=pdfium:790
Change-Id: I4a3623dc0daac6ff8407c09cd00e9f2e4e5dd2d7
Reviewed-on: https://pdfium-review.googlesource.com/7051
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
BUG=pdfium:788
Change-Id: I9f211d42e60c0d8b7b3c508d340036a3b26542dd
Reviewed-on: https://pdfium-review.googlesource.com/7041
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
|
|
Change-Id: I1f3933709ad4a4f251a634dbe6d87a541994f02e
Reviewed-on: https://pdfium-review.googlesource.com/7037
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
|
|
Bug: pdfium:731
Change-Id: I285332c8f9d988327e8633cb0746af2b76c401e5
Reviewed-on: https://pdfium-review.googlesource.com/6911
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This is unused except for being a pathway for indirect deps.
Change-Id: I717290235ccbc59429ad24231033382958e2a086
Reviewed-on: https://pdfium-review.googlesource.com/6910
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
|
|
BUG=pdfium:690
Change-Id: I922279e4bdc8b411f47f49798155e8f9118c1396
Reviewed-on: https://pdfium-review.googlesource.com/6552
Commit-Queue: Chris Palmer <palmer@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
Instead of using EXPECT_EQ() and constructing a std::string.
Change-Id: I7f349f49a03b1ebbad15865f9783568f4d025d91
Reviewed-on: https://pdfium-review.googlesource.com/6670
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Bug: pdfium:731
Change-Id: Ic492e8900c4a69082ff9c2384006a4e6bfa3313e
Reviewed-on: https://pdfium-review.googlesource.com/6592
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
|
|
Bug: pdfium:731
Change-Id: Id4cb57aaf1d045d5052869477a8c5082cab8961c
Reviewed-on: https://pdfium-review.googlesource.com/6675
Reviewed-by: dsinclair <dsinclair@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
BUG=chromium:733245
Change-Id: Ic9347e2cc245831c0b71fac1d531c33c5646ab3f
Reviewed-on: https://pdfium-review.googlesource.com/6671
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
|
|
std::ostringstream.""
This reverts commit 53827cbbfebae66dd31f7aa30d3ee5c88716897a.
Reason for revert: Rollforward of original CL - test failures were flakes.
Original change's description:
> Revert "Adding constructor of CFX_ByteString that takes a std::ostringstream."
>
> This reverts commit 4633d52736c4b926eceb1e18c4b379ff57fd31fa.
>
> Reason for revert: windows_xfa_clang broke?
>
> Original change's description:
> > Adding constructor of CFX_ByteString that takes a std::ostringstream.
> >
> > Bug: pdfium:731
> > Change-Id: Ia0734deb3f309732dccae5c0cf6131d32713e87a
> > Reviewed-on: https://pdfium-review.googlesource.com/6394
> > Reviewed-by: dsinclair <dsinclair@chromium.org>
> > Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
>
> TBR=dsinclair@chromium.org,hnakashima@chromium.org
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: pdfium:731
>
> Change-Id: I674aa1be12d6777c4d565d3131910ac5a11d8dc0
> Reviewed-on: https://pdfium-review.googlesource.com/6395
> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
> Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
TBR=dsinclair@chromium.org,pdfium-reviews@googlegroups.com,hnakashima@chromium.org
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: pdfium:731
Change-Id: I4a31a1a6bdb128016183c1059f0bfe1fa559a89e
Reviewed-on: https://pdfium-review.googlesource.com/6434
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
|
|
This reverts commit 4633d52736c4b926eceb1e18c4b379ff57fd31fa.
Reason for revert: windows_xfa_clang broke?
Original change's description:
> Adding constructor of CFX_ByteString that takes a std::ostringstream.
>
> Bug: pdfium:731
> Change-Id: Ia0734deb3f309732dccae5c0cf6131d32713e87a
> Reviewed-on: https://pdfium-review.googlesource.com/6394
> Reviewed-by: dsinclair <dsinclair@chromium.org>
> Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
TBR=dsinclair@chromium.org,hnakashima@chromium.org
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: pdfium:731
Change-Id: I674aa1be12d6777c4d565d3131910ac5a11d8dc0
Reviewed-on: https://pdfium-review.googlesource.com/6395
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
|
|
Bug: pdfium:731
Change-Id: Ia0734deb3f309732dccae5c0cf6131d32713e87a
Reviewed-on: https://pdfium-review.googlesource.com/6394
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
|
|
This CL adds tests for the date parsing and formatting code in
CFGAS_FormatString.
Change-Id: I9989cdd1b3f92c90d46ee2c3f7838fe1de255be2
Reviewed-on: https://pdfium-review.googlesource.com/6178
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Use name that clues in bug triage folks as I'm writing
Probe -> severity low in each new bug report.
Also add comment from the unlanded chromium-side CL.
No functional change.
Change-Id: I49399e8450eaecd1369a85ea0212bdd69b1d0824
Reviewed-on: https://pdfium-review.googlesource.com/6070
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Change-Id: I061132b3de0f388f4f4c103ff0377405de2ecf29
Reviewed-on: https://pdfium-review.googlesource.com/6012
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Sed + minimal conversions to compile, including moving some
constructors into the .cpp file. Any that caused ASAN issues
during the tests were omitted rather than trying to resolve
the underlying issue.
Change-Id: I00a421f33b253eb4071ffd9af3f2922c7443b335
Reviewed-on: https://pdfium-review.googlesource.com/5891
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
Otherwise, the UnownedPtr destructor will try to probe it. ASAN
knows about the structure of std::vector and will flag it as such.
Bug: 724960
Change-Id: I2b24501704c3845a4b16edad191d7b8f41f77587
Reviewed-on: https://pdfium-review.googlesource.com/5750
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
Add Release() method, type-convertible compares and assigns, and
right hand vs. left hand comparisons.
Change-Id: I96b1112e328802143d314aa6c92948f26583fa90
Reviewed-on: https://pdfium-review.googlesource.com/5731
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Change interform to avoid temp StringC with dangling ptr.
Change-Id: I8d8659973bcdf2cdbcaa6efa6012e4acce5f1604
Reviewed-on: https://pdfium-review.googlesource.com/5571
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
In particular, doing m_pPtr = nullptr; in your dtor to evade this
check will not longer work.
Fix slight mis-ordering observeds in CFX_Font and CPDFXFA_Context.
Change-Id: I3e6137159430333b091364021283a54a13d916b5
Reviewed-on: https://pdfium-review.googlesource.com/5570
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
There are places where an object "child" has a raw pointer
back to object "owner" with the understanding that owner will
always outlive child.
Violating this constraint can lead to use after free, but this
requires finding two paths: one that frees the objects in the
wrong order, and one that uses the object after the free. The
purpose of this patch is to detect the constraint violation
even when the second path is not hit.
We create a template that is used in place of TYPE*. It's dtor,
when a memory tool is present, goes out and probes the first
byte of the object to which it points. Used in "child", this
allows the memory tool to prove that the "owner" is still alive
at the time the child is destroyed, and hence the constraint is
never violated.
Change-Id: I2a6d696d51dda4a79ee2f00a6752965e058a6417
Reviewed-on: https://pdfium-review.googlesource.com/5475
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
This Cl allows passing a CFX_ByteStringC to IFX_WriteStream along with the
buffer method. This makes it easier to pass C-style strings to the stream.
Change-Id: I1051eb3ba17c7fbd42984c14dc60cbce24d72f3f
Reviewed-on: https://pdfium-review.googlesource.com/5430
Reviewed-by: Nicolás Peña <npm@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: Ibd8d70264d79afc0baabaa5093aceb21ee777196
Reviewed-on: https://pdfium-review.googlesource.com/5334
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This Cl moves the implementation of the archive buffer behind an
IFX_ArchiveStream interface. The buffer holds the current offset and the
offset parameter is removed from the CPDF_Creator and various other
methods.
Change-Id: Ia54e803b58bbfb6ef03fec4a940d2c056d541356
Reviewed-on: https://pdfium-review.googlesource.com/5255
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This Cl conslidates if statements, converts int returns to bools where
possible and various other cleanups in fpdfapi/edit.
Change-Id: Ia31ecc69843117eb5ebfff449a6046a267d08e89
Reviewed-on: https://pdfium-review.googlesource.com/5190
Reviewed-by: Nicolás Peña <npm@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: I84cd8e91a296119ecf80b7a092b886f291bebb45
Reviewed-on: https://pdfium-review.googlesource.com/4953
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
They should each know what they are rather than having an
external ChildRecord struct to track the type.
Change-Id: Ic647ba45569764073e944d30af1a96dccdc29eb3
Reviewed-on: https://pdfium-review.googlesource.com/5210
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Layering prevents the (newly-moved) CFX_Char from knowing about
this class, so some casting is still required.
Change-Id: I5b7556fdfa80d09e5116b171b01ab5e707763bf0
Reviewed-on: https://pdfium-review.googlesource.com/5172
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Bug: pdfium:667
Change-Id: I811571c334ff28162905a65781ca14f03caf2966
Reviewed-on: https://pdfium-review.googlesource.com/4910
Commit-Queue: Nicolás Peña <npm@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
- FXSYS_toDecimalDigit() becomes FXSYS_DecimalCharToInt().
- FXSYS_toHexDigit() becomes FXSYS_HexCharToInt().
Change-Id: If4683e8f85f05124b92ff075056cbc295442087d
Reviewed-on: https://pdfium-review.googlesource.com/4930
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
This CL removes the CFX_CharMap class and moves the two static methods
into the files in which they're used.
Change-Id: I8ff7cbfd7f1ef3970e39c77ffa3439099f7fec02
Reviewed-on: https://pdfium-review.googlesource.com/4873
Reviewed-by: dsinclair <dsinclair@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This Cl cleans up more IFX_Pause parameters which are always null.
Change-Id: Ia48600f06216db64a2db8e6e97222a91bd4ba149
Reviewed-on: https://pdfium-review.googlesource.com/4890
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
|
|
No code needs this execpt one file.
Change-Id: Ibceb33259f5a3635de36a272ebd49ef572004cbc
Reviewed-on: https://pdfium-review.googlesource.com/4832
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: I612d9eaa47f6e4b023a49ab9120372de3d73cdc7
Reviewed-on: https://pdfium-review.googlesource.com/4831
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Many of these are already unique_ptrs.
Change-Id: I3695d4ff5a8f7483ad994ac7657897fd55069cd5
Reviewed-on: https://pdfium-review.googlesource.com/4690
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: I801f3cf11a27f91fa3e75518143f953050b2f607
Reviewed-on: https://pdfium-review.googlesource.com/4650
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
BUG=chromium:716526
Change-Id: Idbe4624ab2193cee2931c69ed023dd2c1679d124
Reviewed-on: https://pdfium-review.googlesource.com/4615
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Otherwise, the top byte will be unitialized. We later mask it off,
but MSAN isn't clever enough to realize this.
Bug: 716207
Change-Id: Ic4513bbaee6a47654392580d5f404195da4a6509
Reviewed-on: https://pdfium-review.googlesource.com/4591
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Change-Id: I13b43ceafc6a35bcc1e366546a4a408ea01fe4ab
Reviewed-on: https://pdfium-review.googlesource.com/4534
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|