Remove the per-directory suppression, and suppress individual lines in
the files originated by PDFium. Help to avoid new unsafe usage from
being added in any future CLs.
Change-Id: I6b8591ecbf74c4857a02c6f4c28167bde0ce890d
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/149130
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
<string.h> should be banished as its functions are unsafe.
-- Fix IWYU in header files moving some inclusions from .cpp file.
-- Convert include to stdddef.h/stdint.h if size_t or uint*_t types
used directly in file.
Change-Id: If39d62d67f8f2cf3d78b5d3603fd14d9d697db35
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/118913
Reviewed-by: Thomas Sepez <tsepez@google.com>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
The FXSYS_ form requires callers to specify UNSAFE_BUFFERS(). Most
affected files are already in the pdfium_unsafe_buffers_paths.txt
suppression file. Other usage is hand-patched with TODO()s to
investigate safety.
Change-Id: I8c14d9c38b76455c201b5d2fdf1becad3f18730c
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/118371
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: Thomas Sepez <tsepez@google.com>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Move this directory and shorten the pdfium::base nested namespace to
namespace pdfium.
Bug: pdfium:2127
Change-Id: Ie65bc4c3e69e672ff04e2af0218b6f9fc1584d03
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/116671
Reviewed-by: Thomas Sepez <tsepez@google.com>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Instead of returning a std::unique_ptr, with a separate out-parameter
for the size, change GetFileContents() to just return a std::vector.
Because it is only used for reading data files in tests,
GetFileContents() should never have to read an empty file. Therefore, it
can use an empty vector to indicate failure, and not have to wrap the
vector in an optional.
Change-Id: I485551e2ed4c47e98f4535cf91bbf6bff1ca99bb
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/113452
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Switch from NOTREACHED() to NOTREACHED_NORETURN(), or convert
unreachable conditionals into CHECKs.
Bug: pdfium:2008
Change-Id: Ic32de9e76ad07603251ed2a734ba8f8277e586a9
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/107751
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Updates old-style copyright headers to the new style, by removing "All
rights reserved." Also inserts "The" before "PDFium Authors", which is
required by both styles.
Mechanically generated by this command:
PATTERN='Copyright \([0-9]\+\) \(The \)\?PDFium Authors. All rights reserved.'
git grep -l "$PATTERN" \
| xargs sed "s/$PATTERN/Copyright \1 The PDFium Authors/" -i''
Fixed: pdfium:1884
Change-Id: I6f781d811df8839e2e21b85f716529b813828bcd
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/100371
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: K. Moon <kmoon@chromium.org>
Split part of logging.h into check.h and notreached.h, just like in
Chromium. Change many files that directly call
CHECK()/DCHECK()/NOTREACHED(), but not other logging.h macros, to
include check.h and/or notreached.h instead.
Bug: pdfium:1594
Change-Id: Ide80bd66257f5f267863c36ad0268bbb63225742
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/74275
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Also change |EmbedderTest::loader_| to unique_ptr.
Change-Id: Ib9d42b6eada6716809b46b1bb8585c4c5f4d6df0
Reviewed-on: https://pdfium-review.googlesource.com/c/49990
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>