Age | Commit message (Collapse) | Author |
|
RebuildCrossRef function returns false when we can not find file trailer
or any indirect object. This serves as a basic file format checking.
BUG=pdfium:215
R=jun_fang@foxitsoftware.com
Review URL: https://codereview.chromium.org/1476163002 .
|
|
BUG=pdfium:288
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1476173003 .
|
|
(cherry picked from commit 8d89e65897d8b6cf7899e7a82d9d381c3ad327cb)
(cherry picked from commit c70b19aad245fb1ed39bf8c264d991555f4c5a58)
BUG=pdfium:275
TBR=jun_fang@foxitsoftware.com
Review URL: https://codereview.chromium.org/1473753004 .
|
|
Precursor to making fpdf_text_int.cpp match cleanly.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1477433006 .
|
|
- remove redundant alloc in fx_codec_jpx_unittest.cpp
- free memory allocated by HexDecode calls in fpdf_parser_decode_unittest.cpp
BUG=PDFium:239
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1467183006 .
|
|
It's not required on master, but it costs very little and
makes XFA line up more closely. Also make InitFTLibrary()
public for the same reasons.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1475643003 .
|
|
Also change the copy ctor to take a const ref.
BUG=560520
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1472113002 .
|
|
This matches the type of the corresponding |CFX_DIBSource::m_Pitch|,
where integer overflow is checked for FX_DWORD. This change is
propagated to many other places.
Also, check for integer overflow in |CCodec_RLScanlineDecoder::Create|
during the calculation of |m_Pitch| since it aligns to 4 bytes while
overflow was was previously checked without this alignment.
R=tsepez@chromium.org, thestig@chromium.org
BUG=555784
Review URL: https://codereview.chromium.org/1460033002 .
|
|
R=jun_fang@foxitsoftware.com, tsepez@chromium.org
Review URL: https://codereview.chromium.org/1458633004 .
|
|
Using Chromium's clang + build options, there's more override warnings.
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1453643002 .
|
|
If jpeg_read_scanlines() ends up calling the error callback, we longjmp
into some undefined state.
BUG=558840
R=thestig@chromium.org, tsepez@chromium.org
Review URL: https://codereview.chromium.org/1463563003 .
|
|
It's unused on master, and on XFA, directly calling
SetIdentity() is clearer to the reader anyways.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1459243002 .
|
|
This weeks version, mostly whitespace.
TBR=thestig@chromium.org
Review URL: https://codereview.chromium.org/1466503002 .
|
|
It was breaking the Windows Clang build.
BUG=82385
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1459723005 .
|
|
TBR=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1452843005 .
|
|
TBR=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1456823002 .
|
|
Instead of taking a const pointer, and then casting away the const-ness.
Also remove similar, but dead CPDF_InterForm methods.
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1456763003 .
|
|
Sadly I've gotten these to fail with Chromium debug builds.
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1447163004 .
|
|
This reverts commit 0569ab0b11b723d9bca4ddd642b0cf8828c4bdd1.
This changes the various comparisons of char >= '0' && char <= '9' and
char < '0' || char > '9' to use std::isdigit checks. It also cleans up
a handful of hex to digit conversions to call one common method.
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1449873003 .
|
|
That refer to parent directories.
R=dsinclair@chromium.org
Review URL: https://codereview.chromium.org/1434223002 .
|
|
During decoding, when an image decoder is encountered, any
subsequent decoders are ignored, but remain in the array. However,
later on CPDF_DIBSource::ValidateDictParam expects the image
decoder to be the last in the array, causing issues.
A check is also added in CPDF_DIBSource::GetScanline to ensure
that the calculated pitch value is <= the (4-aligned) pitch value in the
cached bitmap to prevent future issues.
Also cleans up some NULL usages.
BUG=552046
R=jun_fang@foxitsoftware.com, tsepez@chromium.org
Review URL: https://codereview.chromium.org/1406943005 .
|
|
The GetFontData() behavior in FPDF_SYSFONTINFO seems reasonable.
Also do some code cleanup.
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1425023003 .
|
|
CPDF_DIBSource::DownSampleScanline32Bit
Previously, if |m_bpc| was < 8 (e.g. 4), this function may still try to
access the source components as if |m_bpc| == 8. Even when it fell into
the codepath that tried to do the right thing in this case, it was
wrong.
BUG=554151
R=tsepez@chromium.org, thestig@chromium.org
Committed: https://pdfium.googlesource.com/pdfium/+/9b99615806e358fdb396d1cb162ee2e69c2a20ec
Review URL: https://codereview.chromium.org/1433423002 .
|
|
CPDF_DIBSource::DownSampleScanline32Bit"
This reverts commit 9b99615806e358fdb396d1cb162ee2e69c2a20ec.
Broke Windows build.
TBR=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1437963003 .
|
|
Previously, if |m_bpc| was < 8 (e.g. 4), this function may still try to
access the source components as if |m_bpc| == 8. Even when it fell into
the codepath that tried to do the right thing in this case, it was
wrong.
BUG=554151
R=tsepez@chromium.org, thestig@chromium.org
Review URL: https://codereview.chromium.org/1433423002 .
|
|
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1432863004 .
|
|
See bug for details.
BUG=pdfium:273
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1432073003 .
|
|
R=tsepez@chromium.org
BUG=554115
Review URL: https://codereview.chromium.org/1435473004 .
|
|
This reverts commit b27902b8995bb3e003daed6b0811ed746763c68d.
Cleanup some numeric code.
This changes the various comparisons of char >= '0' && char <= '9' and
char < '0' || char > '9' to use std::isdigit checks. It also cleans up
a handful of hex to digit conversions to call one common method.
TBR=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1432973003 .
|
|
- Remove CPDF_Stream::Create() and checks that it might fail.
- Remove m_pCryptoHandler that's always a nullptr.
- Remove m_FileOffset that's always 0.
- Rename file version of InitStream() to InitStreamFromFile().
- Use IsMemoryBased() in more places.
R=dsinclair@chromium.org
Review URL: https://codereview.chromium.org/1415163009 .
|
|
This reverts commit da06e60fb5a095a91c9a4f509466667878624cb3.
Cleanup some numeric code.
This changes the various comparisons of char >= '0' && char <= '9' and
char < '0' || char > '9' to use std::isdigit checks. It also cleans up
a handful of hex to digit conversions to call one common method.
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1433513002 .
|
|
R=dsinclair@chromium.org
Review URL: https://codereview.chromium.org/1436573003 .
|
|
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1437603002 .
|
|
Move some functions into an anonymous namespace.
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1431253002 .
|
|
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1427633010 .
|
|
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1430213002 .
|
|
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1408063016 .
|
|
R=weili@chromium.org
Review URL: https://codereview.chromium.org/1420693004 .
|
|
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1426403008 .
|
|
run from any directory.
Previously the tests which read test files assume the current directory is under pdfium. Running from any other directory will break the build.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1408003014 .
|
|
BUG=pdfium:268
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1425293010 .
|
|
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1419533016 .
|
|
Do some IWYU to fix build errors due to files that have no #includes but
just happened to work previously because the #includes were in the right
order.
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1407423004 .
|
|
- In non-standalone builds, use the provided jpeg library.
- Run gn format over all the GN files.
- Also roll DEPS for buildtools to c2f2598.
BUG=541704
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1425153006 .
|
|
This tests whether RebuildCrossRef could handle well-formatted pdf file.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1409013005 .
|
|
Patch by rickyz@chromium.org
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1432703002 .
|
|
Also cleans up some places in the relevant functions since we're here.
BUG=551460
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1421783004 .
|
|
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1419373005 .
|
|
The state '12' is only used once. This CL folds the contents of state 12 back
into the place where we set our state to 12.
This works because all state 12 does is decrement the loop counter so we process
the same character again and move us to state 0.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1430643007 .
|
|
Missed one mac-only rename.
TBR=thestig@chromium.org
Review URL: https://codereview.chromium.org/1414693009 .
|