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

Side by Side Diff: ui/display/util/edid_parser_fuzzer.cc

Issue 2252643003: ui: Add a libfuzzer based fuzzer for EDID parser (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 months 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 unified diff | Download patch
« no previous file with comments | « ui/display/util/BUILD.gn ('k') | ui/display/util/fuzz_corpus/internal » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include <stddef.h>
6 #include <stdint.h>
7
8 #include <vector>
9
10 #include "ui/display/util/edid_parser.h"
11 #include "ui/gfx/geometry/size.h"
12
13 // Entry point for LibFuzzer.
14 extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
15 std::vector<uint8_t> edid;
16 edid.assign(data, data + size);
17 uint16_t manufacturer_id, product_code;
18 std::string human_readable_name;
19 gfx::Size active_pixel_size, physical_display_size;
20 bool overscan;
21
22 ui::ParseOutputDeviceData(edid, &manufacturer_id, &product_code,
23 &human_readable_name, &active_pixel_size,
24 &physical_display_size);
25
26 ui::ParseOutputOverscanFlag(edid, &overscan);
27 return 0;
28 }
OLDNEW
« no previous file with comments | « ui/display/util/BUILD.gn ('k') | ui/display/util/fuzz_corpus/internal » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698