diff options
author | tsepez <tsepez@chromium.org> | 2016-11-16 12:26:06 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-11-16 12:26:06 -0800 |
commit | 8a3aa459fc5284f51bcd7e98e95bf6214f47bb67 (patch) | |
tree | 13fb383936d679aded19054f4e7a0387dd52de76 /testing | |
parent | 14a60c50b10de1d9e4edd3629ea210a816940a75 (diff) | |
download | pdfium-8a3aa459fc5284f51bcd7e98e95bf6214f47bb67.tar.xz |
Make CPDF_Array take unique_ptrs
BUG=
Review-Url: https://codereview.chromium.org/2498223005
Diffstat (limited to 'testing')
-rw-r--r-- | testing/libfuzzer/pdf_hint_table_fuzzer.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/testing/libfuzzer/pdf_hint_table_fuzzer.cc b/testing/libfuzzer/pdf_hint_table_fuzzer.cc index 16d0401ff5..15e04d9b3d 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()); |