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

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

Issue 2502103002: Add FIDO U2F message and packet classes (Closed)
Patch Set: Add basic fuzzer test, and updated constructor for U2fMessage to account for invalid packets Created 4 years 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
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 #include "u2f_message.h"
8
9 extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
10 scoped_refptr<net::IOBufferWithSize> buf =
11 make_scoped_refptr(new net::IOBufferWithSize(size));
Reilly Grant (use Gerrit) 2016/12/10 00:02:44 scoped_refptr<net::IOBufferWithSize> buf( new
Casey Piper 2016/12/10 01:38:03 Done.
12 memcpy(buf->data(), data, size);
13 scoped_refptr<device::U2fMessage> msg =
14 device::U2fMessage::CreateFromSerializedData(buf);
15 return 0;
16 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698