Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(219)

Unified Diff: testing/libfuzzer/pdf_hint_table_fuzzer.cc

Issue 2498223005: Make CPDF_Array take unique_ptrs (Closed)
Patch Set: nits Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « fpdfsdk/fpdfsave.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: testing/libfuzzer/pdf_hint_table_fuzzer.cc
diff --git a/testing/libfuzzer/pdf_hint_table_fuzzer.cc b/testing/libfuzzer/pdf_hint_table_fuzzer.cc
index 16d0401ff541a66ab4b68764683d1c3e66e735ee..15e04d9b3dc692bb4a76bbdb1060bdae7814fe32 100644
--- a/testing/libfuzzer/pdf_hint_table_fuzzer.cc
+++ b/testing/libfuzzer/pdf_hint_table_fuzzer.cc
@@ -8,6 +8,7 @@
#include "core/fpdfapi/parser/cpdf_dictionary.h"
#include "core/fpdfapi/parser/cpdf_hint_tables.h"
#include "core/fpdfapi/parser/cpdf_linearized_header.h"
+#include "core/fpdfapi/parser/cpdf_number.h"
#include "third_party/base/ptr_util.h"
int32_t GetData(const int32_t** data32, const uint8_t** data, size_t* size) {
@@ -73,9 +74,9 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
auto hint_info = pdfium::MakeUnique<CPDF_Array>();
// Add primary hint stream offset
- hint_info->AddInteger(GetData(&data32, &data, &size));
+ hint_info->AddNew<CPDF_Number>(GetData(&data32, &data, &size));
// Add primary hint stream size
- hint_info->AddInteger(GetData(&data32, &data, &size));
+ hint_info->AddNew<CPDF_Number>(GetData(&data32, &data, &size));
// Set hint stream info.
linearized_dict->SetFor("H", hint_info.release());
« no previous file with comments | « fpdfsdk/fpdfsave.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698