Age | Commit message (Collapse) | Author |
|
bpno_plus_one is used as a parameter bpno for a bunch of methods that calculate
1 << bpno. Thus, use a reduced value when it's large enough to cause undefined
shift. bpno_plus_one itself remains unchanged so that the number of calls
remains the same
Bug: chromium:698526
Change-Id: I40431d41a04f3e2315bd3c80114cd0fcbd2815b4
Reviewed-on: https://pdfium-review.googlesource.com/5310
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Nicolás Peña <npm@chromium.org>
|
|
BUG=chromium:665087,chromium:718492
Change-Id: I09e93b4167ab2c0b3b53641243aa0cbeb5b98c4f
Reviewed-on: https://pdfium-review.googlesource.com/3114
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
|
|
Change-Id: Ia0ea49f0460fcb8e55542f237d321bb9207aa8e1
Reviewed-on: https://pdfium-review.googlesource.com/5250
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
member.
Change-Id: I51e30d298e87b9ae0d5aca83b2f1d6787efce70a
Reviewed-on: https://pdfium-review.googlesource.com/5290
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
|
|
Remove not useful error parameter.
Change-Id: I6f49a51a47c9d7f45e75a585679e15f0414aac26
Reviewed-on: https://pdfium-review.googlesource.com/5254
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Nicolás Peña <npm@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: I9754da8d1bf54b328761ac9d83fcc4a3518b4a73
Reviewed-on: https://pdfium-review.googlesource.com/5230
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Nicolás Peña <npm@chromium.org>
|
|
pages, as the documentation explicitly allows this.
Bug:pdfium:710
Change-Id: I0535b45c16ae7a53609da3b09ff7d427c52567b5
Reviewed-on: https://pdfium-review.googlesource.com/5270
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: Ia0a78be3320c5d6c3d0c40d4199cae1473e0e8dc
Reviewed-on: https://pdfium-review.googlesource.com/5253
Reviewed-by: dsinclair <dsinclair@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>
|
|
Change-Id: Ic602126dc5407fcbb56dca5ec43e1824a5ca55b6
Reviewed-on: https://pdfium-review.googlesource.com/5251
Reviewed-by: Tom Sepez <tsepez@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>
|
|
Callers should use FPDFPageObj_NewImageObj() instead.
Change-Id: If9f262af771344799a372645e466d3b8e64482ed
Reviewed-on: https://pdfium-review.googlesource.com/5153
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
The 38 value seems arbitrary, and the prec is used in OPJ_INT32 with 1 <<
(prec - 1). So limit it to be at most 31, and avoid undefined shifts.
Bug: chromium:698498
Change-Id: I840f2e65231ac7847ed26bcaea36471a53be49e8
Reviewed-on: https://pdfium-review.googlesource.com/5173
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Nicolás Peña <npm@chromium.org>
|
|
Minor cleans in the fpdfapi/edit code.
Change-Id: I7bb2f4add7c6e84f072501035b1f77c218174cca
Reviewed-on: https://pdfium-review.googlesource.com/5152
Reviewed-by: Nicolás Peña <npm@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL changes the tag_gif_decompress_struct into CGifDecompressor. It cleans
up a bunch of unnecessary function pointers and starts cleaning up the members
of the new class.
Change-Id: Id49cd8f5377dc8daaa15118551dadad4ddde7931
Reviewed-on: https://pdfium-review.googlesource.com/5170
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Nicolás Peña <npm@chromium.org>
|
|
This Cl moves the adapater out of the fpdfsave.cpp file into its own
h/cpp files. The adapter was renamed for clarity. The CPDF_Creator was
modified to take the adapter as a constructor param and the Create
methods consolidated.
Change-Id: Icb104f195ef532dda053c859aae356a8d4a7a54c
Reviewed-on: https://pdfium-review.googlesource.com/5151
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This Cl renames the fpdf_edit_create file to better match the
cpdf_creator content. The CPDF_ObjectStream and CPDF_XRefStream code is
moved out to their own .cpp files. Needed anonymous classes are split
out as well.
Change-Id: Ic83fb319ce28c816db82a4286e22032dc68811bc
Reviewed-on: https://pdfium-review.googlesource.com/5171
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Nicolás Peña <npm@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>
|
|
Change-Id: I5bc24fb56adfa2ef9b46edd7409e6086093ccf8a
Reviewed-on: https://pdfium-review.googlesource.com/5150
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
The cast is too strict for all of the objects to be processed,
however all of the fields in use are present in a parent class
to which these objects all belong.
Bug: 718498
Change-Id: Ibe1d800c73215c36550e54bf18de90cc9d295ef9
Reviewed-on: https://pdfium-review.googlesource.com/5130
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This Cl creates a cpdf_objectstream and cpdf_xrefstream headers from the
editint header.
Change-Id: I857981fa055ee9296cbd344860e55c67acf200ce
Reviewed-on: https://pdfium-review.googlesource.com/5113
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
|
|
This CL removes the friend declarations from CPDF_Creator and adds
accessor methods instead.
Change-Id: I6d8f67b5944aed34af00ff6ea9d23fe7d17cec18
Reviewed-on: https://pdfium-review.googlesource.com/5112
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
The AppendObject method has been removed and the functionality moved
to the individual CPDF_Object classes.
Change-Id: I5446c6cc3e792d849acf77caed34b63a88f3a2d2
Reviewed-on: https://pdfium-review.googlesource.com/5072
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
This Cl removes un-needed prefixes from anonymous method names and
cleans up various defines.
Change-Id: If46a04c80460bb675af68d1e08d3093855d8fb19
Reviewed-on: https://pdfium-review.googlesource.com/5111
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL applies the following upstream patch:
https://github.com/mm2/Little-CMS/commit/02c95fa76bdc4f73113373070278666f47aff82f
Bug: chromium:718500
Change-Id: I7898b22e44a5ea5c0d1c301233037fbaabb8e327
Reviewed-on: https://pdfium-review.googlesource.com/5092
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: I9306afed2747e3b0054adeea1d39916cac47f5c5
Reviewed-on: https://pdfium-review.googlesource.com/5091
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
If the count of items is large enough, there maybe not enough data in
the file to read. This Cl verifies we'll have enough data before
attempting to allocate the memory to store the results.
Bug: chromium:718504
Change-Id: I82e7df3511e529c4bd72a772e9d6e607a0615927
Reviewed-on: https://pdfium-review.googlesource.com/5110
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
When decoding the CPDF_HintTable we read the dwDeltaGroupLen value out
of the input stream which is a 16bit number. That value is then passed
in to read a uint32_t of the object number. If we have a group length of
> 32 bits we'll cause an undefined shift when we attempt to shift right
more then 32 bits.
This Cl bails out early if the dwDeltaGroupLen value is > 32 in order to
stop the undefined shifts.
Bug: chromium:718505
Change-Id: I919d6f4cd19826094a5e44d3a65d758029f5c236
Reviewed-on: https://pdfium-review.googlesource.com/5090
Reviewed-by: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
I did not realize it's possible to easily test public API when the
function itself was added in commit
1423319f52c5e80253d337ad02b19187c6d66ff1 (Add public method
FPDFPageObj_GetType to get type of a page object., 2017-04-03).
Change-Id: I4b6f4a18eabbebbebb350e69db2b187b35c38da6
Reviewed-on: https://pdfium-review.googlesource.com/5071
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Activated by --ps2 and --ps3 for PostScript level 2 and 3, respectively.
The raw output is not formatted in a way for most PostScript processing
tools to recognize as actually PostScript.
Also fix the type of the parameter to FPDF_SetPrintPostscriptLevel()
even though it ends up being a no-op.
Change-Id: Iaa34fd3dfaedad2b016fefe1227cbed9c974ae2a
Reviewed-on: https://pdfium-review.googlesource.com/4996
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
In a way similar to the existing USE_SYSTEM_LIBJPEG. The default is of
course still the DEPS-based zlib checkout.
Changes in v2:
1) Since Chromium doesn't have //third_party:zlib (AKA a "zlib" target in
//third_party/BUILD.GN) all the targets that depended on //third_party:zlib now
depend on third_party:zlib, which always points to PDFium's
third_party/BUILD.GN. The targets that depended on //third_party:zlib in
third_party/BUILD.GN just depend on :zlib instead.
2) Move the zlib bits out of !build_with_chromium block.
Change-Id: Id73eb07591418ff2ae71b83b87c18af71b49a22a
Reviewed-on: https://pdfium-review.googlesource.com/5030
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Consolidate all of the sha2 contexts while we're at it, the one
with the largest buf is suitable for use by all the others.
Change-Id: Iace6cd8ca4405f75f78842a1559c3a2478910218
Reviewed-on: https://pdfium-review.googlesource.com/4994
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
AKA roll clang 299960:300839.
TBR=thakis@chromium.org
Change-Id: Ifa8c30681897b62f182382eecd3bfdb77d7081ee
Reviewed-on: https://pdfium-review.googlesource.com/4993
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Avoid casting willy-nill over uint8_t*s, since there's at
least one place where the wrong cast could be applied.
Use std::vector<> as well.
Use ByteRange struct to avoid the seg[i * 2 + 1] anti-pattern.
Change-Id: I9278ccc3a545b2640f0daf101a0c8b1d5c5564f8
Reviewed-on: https://pdfium-review.googlesource.com/5012
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
This CL cleans up a bunch of nits and improves ownership in the CStretchEngine
class.
Change-Id: I6527f29c50dab329ef58d0724cd24b94fca50ee6
Reviewed-on: https://pdfium-review.googlesource.com/4970
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Tom Sepez <tsepez@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>
|
|
Change-Id: If90483a8fee2e3a5cd90e7fe4600ff98b2703e5d
Reviewed-on: https://pdfium-review.googlesource.com/5010
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Use much longer descriptive identifiers while at it.
Pack a little tighter while at it, too.
Change-Id: I123025f6433a627b5e00ee225efa7dc843b07913
Reviewed-on: https://pdfium-review.googlesource.com/5011
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Bug: chromium:666683
Change-Id: I1c633d82e9ef75dd99ef032b4fc46fe8d3651cd1
Reviewed-on: https://pdfium-review.googlesource.com/5050
Commit-Queue: Nicolás Peña <npm@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Remove IFX_Pause parameters which are passed but not used.
Change-Id: I51a491c7f9a429676d114a387390fac3ae65e187
Reviewed-on: https://pdfium-review.googlesource.com/4950
Reviewed-by: Nicolás Peña <npm@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Using a ByteBuffer and an array of uint8_t's isn't how one
would represent an array of structured data. Packing uint16_t's
into a uint32_t via / and % isn't ideal, either.
Bug:
Change-Id: Ib09ae2659ba2f027724546bb7aef99bdfd2dea25
Reviewed-on: https://pdfium-review.googlesource.com/4951
Commit-Queue: 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>
|
|
Draw vertical 1D barcodes as segments of lines, instead of as individual
pixels.
Change-Id: Ic260118660994514ce9023aacf13b16adfc8d362
Reviewed-on: https://pdfium-review.googlesource.com/4595
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Add a comment to clarify and remove some unneeded checks.
Change-Id: I8b0492548b245abc45e161085047c9f36d6c8e2b
Reviewed-on: https://pdfium-review.googlesource.com/4871
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Change-Id: I5d452ea907f4d243645ddae3512776096a827522
Reviewed-on: https://pdfium-review.googlesource.com/4872
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
|
|
The IFX_Pause param is stored but never used. Remove.
Change-Id: I9e5298fc05c6d408873b7bee307a76dcf3d2d4da
Reviewed-on: https://pdfium-review.googlesource.com/4931
Reviewed-by: Nicolás Peña <npm@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Also give an example out directory name and fix a typo.
Change-Id: I2d7532ea8c5fcdbd3502fbafcc07fb59dfafe81c
Reviewed-on: https://pdfium-review.googlesource.com/4878
Commit-Queue: Lei Zhang <thestig@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
The value 1u << (l_pdx + l_level_no) is only used to calculate a minimum,
so skip it when the shift doesn't even fit unsigned integer. Also use the uint
min version since all values being considered are unsigned anyways.
Bug: chromium:666892
Change-Id: I79c6e52022aa894033c5cdabec29c4b8313e293b
Reviewed-on: https://pdfium-review.googlesource.com/4891
Reviewed-by: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Nicolás Peña <npm@chromium.org>
|