Skip to content

Commit 7ce7708

Browse files
committed
Fix warning of uninitialized value in fuzz-crypto
1 parent 4f3df90 commit 7ce7708

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tests/fuzz/fuzz-crypto.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ void encode_base64_differential(const uint8_t *Data, size_t Size) {
4545

4646
//OPENSSL
4747
BIO *bio, *bio_mem;
48-
char *ssl_output;
48+
char *ssl_output = NULL;
4949
int ssl_output_len;
5050

5151
bio = BIO_new(BIO_f_base64());
@@ -58,6 +58,9 @@ void encode_base64_differential(const uint8_t *Data, size_t Size) {
5858
BIO_flush(bio);
5959

6060
ssl_output_len = BIO_get_mem_data(bio_mem, &ssl_output);
61+
if (ssl_output_len <= 0) {
62+
abort();
63+
}
6164

6265
//Differential
6366
int result = memcmp(pj_output, ssl_output, ssl_output_len);

0 commit comments

Comments
 (0)