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

Side by Side Diff: device/u2f/u2f_apdu_fuzzer.cc

Issue 2743623006: Modify U2F apdu classes to use unique pointers (Closed)
Patch Set: Use more concise form of base::Passed Created 3 years, 9 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 | « device/u2f/u2f_apdu_command.cc ('k') | device/u2f/u2f_apdu_response.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "u2f_apdu_command.h" 9 #include "u2f_apdu_command.h"
10 #include "u2f_apdu_response.h" 10 #include "u2f_apdu_response.h"
11 11
12 extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { 12 extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
13 std::vector<uint8_t> input(data, data + size); 13 std::vector<uint8_t> input(data, data + size);
14 scoped_refptr<device::U2fApduCommand> cmd = 14 std::unique_ptr<device::U2fApduCommand> cmd =
15 device::U2fApduCommand::CreateFromMessage(input); 15 device::U2fApduCommand::CreateFromMessage(input);
16 scoped_refptr<device::U2fApduResponse> rsp = 16 std::unique_ptr<device::U2fApduResponse> rsp =
17 device::U2fApduResponse::CreateFromMessage(input); 17 device::U2fApduResponse::CreateFromMessage(input);
18 return 0; 18 return 0;
19 } 19 }
OLDNEW
« no previous file with comments | « device/u2f/u2f_apdu_command.cc ('k') | device/u2f/u2f_apdu_response.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698