Skip to content

Commit fee9788

Browse files
fix for coverity report 394710
1 parent b948f67 commit fee9788

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/api.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65656,7 +65656,7 @@ static int test_EccSigFailure_cm(void)
6565665656
size_t cert_sz = 0;
6565765657

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

0 commit comments

Comments
 (0)