coverity complains about possible double free, which does not seem
to be the case with the current implementation, but it still
would be nice to check and reacto on unexpected sk_sint_push result.
Complements:
9837496142cf "Unit tests for crypto/stack."
Resolves: https://scan5.scan.coverity.com/#/project-view/65249/10222?selectedIssue=
1662046
Related: https://github.com/openssl/project/issues/1317
Signed-off-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/28238)
TEST_info("int stack size %d", i);
goto end;
}
- sk_sint_push(s, v + i);
+ if (!TEST_int_eq(sk_sint_push(s, v + i), i + 1)) {
+ TEST_info("int stack size %d", i);
+ goto end;
+ }
}
if (!TEST_int_eq(sk_sint_num(s), n))
goto end;