Skip to content

Commit

Permalink
Fix warning of uninitialized value in fuzz-crypto
Browse files Browse the repository at this point in the history
  • Loading branch information
sauwming committed May 6, 2024
1 parent 4f3df90 commit 7ce7708
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/fuzz/fuzz-crypto.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ void encode_base64_differential(const uint8_t *Data, size_t Size) {

//OPENSSL
BIO *bio, *bio_mem;
char *ssl_output;
char *ssl_output = NULL;
int ssl_output_len;

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

ssl_output_len = BIO_get_mem_data(bio_mem, &ssl_output);
if (ssl_output_len <= 0) {
abort();
}

//Differential
int result = memcmp(pj_output, ssl_output, ssl_output_len);
Expand Down

0 comments on commit 7ce7708

Please sign in to comment.