OLD | NEW |
1 // Copyright 2016 The PDFium Authors. All rights reserved. | 1 // Copyright 2016 The PDFium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include <cstdint> | 5 #include <cstdint> |
6 | 6 |
7 #include "core/fpdfapi/parser/cpdf_array.h" | 7 #include "core/fpdfapi/parser/cpdf_array.h" |
8 #include "core/fpdfapi/parser/cpdf_dictionary.h" | 8 #include "core/fpdfapi/parser/cpdf_dictionary.h" |
9 #include "core/fpdfapi/parser/cpdf_hint_tables.h" | 9 #include "core/fpdfapi/parser/cpdf_hint_tables.h" |
10 #include "core/fpdfapi/parser/cpdf_linearized.h" | 10 #include "core/fpdfapi/parser/cpdf_linearized_header.h" |
11 #include "third_party/base/ptr_util.h" | 11 #include "third_party/base/ptr_util.h" |
12 | 12 |
13 int32_t GetData(const int32_t** data32, const uint8_t** data, size_t* size) { | 13 int32_t GetData(const int32_t** data32, const uint8_t** data, size_t* size) { |
14 const int32_t* ret = *data32; | 14 const int32_t* ret = *data32; |
15 ++(*data32); | 15 ++(*data32); |
16 *data += 4; | 16 *data += 4; |
17 *size -= 4; | 17 *size -= 4; |
18 return *ret; | 18 return *ret; |
19 } | 19 } |
20 | 20 |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 | 81 |
82 const int shared_hint_table_offset = GetData(&data32, &data, &size); | 82 const int shared_hint_table_offset = GetData(&data32, &data, &size); |
83 | 83 |
84 { | 84 { |
85 FakeLinearized linearized(linearized_dict.get()); | 85 FakeLinearized linearized(linearized_dict.get()); |
86 HintTableForFuzzing hint_table(&linearized, shared_hint_table_offset); | 86 HintTableForFuzzing hint_table(&linearized, shared_hint_table_offset); |
87 hint_table.Fuzz(data, size); | 87 hint_table.Fuzz(data, size); |
88 } | 88 } |
89 return 0; | 89 return 0; |
90 } | 90 } |
OLD | NEW |