| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 The Chromium 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 <stddef.h> | 5 #include <stddef.h> |
| 6 #include <stdint.h> | 6 #include <stdint.h> |
| 7 | 7 |
| 8 #include <base/strings/utf_string_conversions.h> | 8 #include <base/strings/utf_string_conversions.h> |
| 9 #include "base/strings/string16.h" | 9 #include "base/strings/string16.h" |
| 10 | 10 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 logging::SetMinLogLevel(logging::LOG_FATAL); | 27 logging::SetMinLogLevel(logging::LOG_FATAL); |
| 28 } | 28 } |
| 29 | 29 |
| 30 const base::string16 root; | 30 const base::string16 root; |
| 31 }; | 31 }; |
| 32 | 32 |
| 33 Environment* env = new Environment(); | 33 Environment* env = new Environment(); |
| 34 | 34 |
| 35 // Entry point for LibFuzzer. | 35 // Entry point for LibFuzzer. |
| 36 extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { | 36 extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { |
| 37 // Note: Don't use PolicyLoadStatusUmaReporter here, it leaks! |
| 38 PolicyLoadStatusSampler status; |
| 37 RegistryDict dict; | 39 RegistryDict dict; |
| 38 PolicyLoadStatus status; | |
| 39 ReadDataInternal(data, size, env->root, &dict, &status, "data"); | 40 ReadDataInternal(data, size, env->root, &dict, &status, "data"); |
| 40 return 0; | 41 return 0; |
| 41 } | 42 } |
| 42 | 43 |
| 43 } // namespace preg_parser | 44 } // namespace preg_parser |
| 44 } // namespace policy | 45 } // namespace policy |
| OLD | NEW |