| commit | 6b507f6136e8f8c2b789b0ee378414496193daf7 | [log] [tgz] |
|---|---|---|
| author | Tom Sepez <tsepez@chromium.org> | Mon Nov 01 21:11:19 2021 +0000 |
| committer | Pdfium LUCI CQ <pdfium-scoped@luci-project-accounts.iam.gserviceaccount.com> | Mon Nov 01 21:11:19 2021 +0000 |
| tree | 43b1c566f7d27095ab0eb8451cbf7d001102b15f | |
| parent | b47d0ede7f95fb55cda325ba4c1bebd50a3567ba [diff] |
Avoid duplicate bytestring construction in IsValidNumericDictionaryValue() Force callers to create a bytestring arg rather than doing it twice implicitly at line 31 and 33 from the c-style string. Change-Id: Ie3cde0daa8d01773dba2baa90a2ca43a886e1aa1 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/86691 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
diff --git a/core/fpdfapi/parser/cpdf_linearized_header.cpp b/core/fpdfapi/parser/cpdf_linearized_header.cpp index 2c927c7..1ba724e 100644 --- a/core/fpdfapi/parser/cpdf_linearized_header.cpp +++ b/core/fpdfapi/parser/cpdf_linearized_header.cpp
@@ -25,7 +25,7 @@ template <class T> bool IsValidNumericDictionaryValue(const CPDF_Dictionary* pDict, - const char* key, + const ByteString& key, T min_value, bool must_exist = true) { if (!pDict->KeyExist(key))