Skip to content

Commit

Permalink
fix for coverity report 394710
Browse files Browse the repository at this point in the history
  • Loading branch information
JacobBarthelmeh committed Jul 5, 2024
1 parent b948f67 commit fee9788
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/api.c
Original file line number Diff line number Diff line change
Expand Up @@ -65656,7 +65656,7 @@ static int test_EccSigFailure_cm(void)
size_t cert_sz = 0;

ExpectIntEQ(load_file(server_cert, &cert_buf, &cert_sz), 0);
if (cert_buf != NULL) {
if (cert_buf != NULL && cert_sz > 0) {
/* corrupt DER - invert last byte, which is signature */
cert_buf[cert_sz-1] = ~cert_buf[cert_sz-1];

Expand Down

0 comments on commit fee9788

Please sign in to comment.