Branch data Line data Source code
1 : : /* Copyright (c) 2020, Red Hat, Inc.
2 : : *
3 : : * Authors: Jakub Jelen <jjelen@redhat.com>
4 : : *
5 : : * This code is licensed under the GNU LGPL, version 2.1 or later.
6 : : * See the COPYING file in the top-level directory.
7 : : */
8 : :
9 : : #include <stdlib.h>
10 : : #include <libcacard.h>
11 : : #include <simpletlv.h>
12 : :
13 : : #include "fuzzer.h"
14 : :
15 : 1 : int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size)
16 : : {
17 : : uint8_t *data = (uint8_t *) Data;
18 : 1 : size_t outlen = 0;
19 : : struct simpletlv_member *tlv = NULL;
20 : :
21 : 1 : tlv = simpletlv_parse(data, Size, &outlen);
22 : 1 : simpletlv_free(tlv, outlen);
23 : :
24 : 1 : return 0;
25 : : }
26 : :
27 : : /* vim: set ts=4 sw=4 tw=0 noet expandtab: */
|