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 #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 } |
OLD | NEW |