OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 <vector> | 8 #include <vector> |
9 | 9 |
10 #include "ui/display/util/edid_parser.h" | 10 #include "ui/display/util/edid_parser.h" |
11 #include "ui/gfx/geometry/size.h" | 11 #include "ui/gfx/geometry/size.h" |
12 | 12 |
| 13 struct Environment { |
| 14 Environment() { |
| 15 logging::SetMinLogLevel(logging::LOG_FATAL); |
| 16 } |
| 17 }; |
| 18 |
| 19 Environment* env = new Environment(); |
| 20 |
13 // Entry point for LibFuzzer. | 21 // Entry point for LibFuzzer. |
14 extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { | 22 extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { |
15 std::vector<uint8_t> edid; | 23 std::vector<uint8_t> edid; |
16 edid.assign(data, data + size); | 24 edid.assign(data, data + size); |
17 uint16_t manufacturer_id, product_code; | 25 uint16_t manufacturer_id, product_code; |
18 std::string human_readable_name; | 26 std::string human_readable_name; |
19 gfx::Size active_pixel_size, physical_display_size; | 27 gfx::Size active_pixel_size, physical_display_size; |
20 bool overscan; | 28 bool overscan; |
21 | 29 |
22 ui::ParseOutputDeviceData(edid, &manufacturer_id, &product_code, | 30 ui::ParseOutputDeviceData(edid, &manufacturer_id, &product_code, |
23 &human_readable_name, &active_pixel_size, | 31 &human_readable_name, &active_pixel_size, |
24 &physical_display_size); | 32 &physical_display_size); |
25 | 33 |
26 ui::ParseOutputOverscanFlag(edid, &overscan); | 34 ui::ParseOutputOverscanFlag(edid, &overscan); |
27 return 0; | 35 return 0; |
28 } | 36 } |
OLD | NEW |