Do not jump to the err label on rent NULL check failure (where
it is dereferenced) and rather return immediately.
Resolves: https://scan5.scan.coverity.com/#/project-view/65248/10222?selectedIssue=
1681462
Fixes: 4af71a77387c "ECH CLI implementation"
Signed-off-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
MergeDate: Wed Feb 25 11:10:52 2026
(Merged from https://github.com/openssl/openssl/pull/30139)
unsigned char test_pub[OSSL_ECH_CRYPTO_VAR_SIZE];
OSSL_ECHSTORE_ENTRY *ee = NULL;
- if (rent == NULL || pkt == NULL) {
+ if (rent == NULL) {
+ ERR_raise(ERR_LIB_SSL, ERR_R_INTERNAL_ERROR);
+ return 0;
+ }
+ if (pkt == NULL) {
ERR_raise(ERR_LIB_SSL, ERR_R_INTERNAL_ERROR);
goto err;
}