Line | Count | Source (jump to first uncovered line) |
1 | | /* Copyright 2023 Google LLC |
2 | | Licensed under the Apache License, Version 2.0 (the "License"); |
3 | | you may not use this file except in compliance with the License. |
4 | | You may obtain a copy of the License at |
5 | | http://www.apache.org/licenses/LICENSE-2.0 |
6 | | Unless required by applicable law or agreed to in writing, software |
7 | | distributed under the License is distributed on an "AS IS" BASIS, |
8 | | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
9 | | See the License for the specific language governing permissions and |
10 | | limitations under the License. |
11 | | */ |
12 | | #include <stdint.h> |
13 | | #include <string.h> |
14 | | #include <stdlib.h> |
15 | | |
16 | | #include <u.h> |
17 | | #include <libc.h> |
18 | | #include <auth.h> |
19 | | #include <mp.h> |
20 | | #include <libsec.h> |
21 | | |
22 | 1.61k | int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size){ |
23 | 1.61k | char *fuzz_der = (char *)malloc(size+1); |
24 | 1.61k | if (fuzz_der == NULL){ |
25 | 0 | return 0; |
26 | 0 | } |
27 | 1.61k | memcpy(fuzz_der, data, size); |
28 | 1.61k | fuzz_der[size] = '\0'; |
29 | 1.61k | asn1dump(fuzz_der, size); |
30 | | |
31 | 1.61k | free(fuzz_der); |
32 | 1.61k | return 0; |
33 | 1.61k | } |