/src/openssl111/fuzz/rand.inc
Line | Count | Source (jump to first uncovered line) |
1 | | /* |
2 | | * Copyright 2016 The OpenSSL Project Authors. All Rights Reserved. |
3 | | * |
4 | | * Licensed under the OpenSSL licenses, (the "License"); |
5 | | * you may not use this file except in compliance with the License. |
6 | | * You may obtain a copy of the License at |
7 | | * https://www.openssl.org/source/license.html |
8 | | * or in the file LICENSE in the source distribution. |
9 | | */ |
10 | | #include <openssl/rand.h> |
11 | | |
12 | | static int fuzz_bytes(unsigned char *buf, int num) |
13 | 144k | { |
14 | 144k | unsigned char val = 1; |
15 | | |
16 | 5.83M | while (--num >= 0) |
17 | 5.68M | *buf++ = val++; |
18 | 144k | return 1; |
19 | 144k | } Line | Count | Source | 13 | 38.8k | { | 14 | 38.8k | unsigned char val = 1; | 15 | | | 16 | 1.71M | while (--num >= 0) | 17 | 1.67M | *buf++ = val++; | 18 | 38.8k | return 1; | 19 | 38.8k | } |
Line | Count | Source | 13 | 1.08k | { | 14 | 1.08k | unsigned char val = 1; | 15 | | | 16 | 41.5k | while (--num >= 0) | 17 | 40.4k | *buf++ = val++; | 18 | 1.08k | return 1; | 19 | 1.08k | } |
Line | Count | Source | 13 | 57.9k | { | 14 | 57.9k | unsigned char val = 1; | 15 | | | 16 | 2.01M | while (--num >= 0) | 17 | 1.96M | *buf++ = val++; | 18 | 57.9k | return 1; | 19 | 57.9k | } |
Line | Count | Source | 13 | 46.8k | { | 14 | 46.8k | unsigned char val = 1; | 15 | | | 16 | 2.05M | while (--num >= 0) | 17 | 2.00M | *buf++ = val++; | 18 | 46.8k | return 1; | 19 | 46.8k | } |
|
20 | | |
21 | | static int fuzz_status(void) |
22 | 0 | { |
23 | 0 | return 1; |
24 | 0 | } Unexecuted instantiation: server.c:fuzz_status Unexecuted instantiation: x509.c:fuzz_status Unexecuted instantiation: client.c:fuzz_status Unexecuted instantiation: asn1.c:fuzz_status |
25 | | |
26 | | static RAND_METHOD fuzz_rand_method = { |
27 | | NULL, |
28 | | fuzz_bytes, |
29 | | NULL, |
30 | | NULL, |
31 | | fuzz_bytes, |
32 | | fuzz_status |
33 | | }; |
34 | | |
35 | | void FuzzerSetRand(void) |
36 | 8 | { |
37 | 8 | RAND_set_rand_method(&fuzz_rand_method); |
38 | 8 | } |
39 | | |
40 | | |