mirror of
https://github.com/openssl/openssl.git
synced 2025-01-24 13:55:42 +08:00
Always add a suitable error if we fail to decode
We're always supposed to add the fallback "unsupported" error if we don't have anything better. However in some cases this wasn't happening because we were incorrectly setting "flag_construct_called" - even though the construct function had failed. Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/21603)
This commit is contained in:
parent
6207f2b657
commit
564e5b754a
@ -779,10 +779,11 @@ static int decoder_process(const OSSL_PARAM params[], void *arg)
|
||||
(void *)new_data.ctx, LEVEL, rv);
|
||||
} OSSL_TRACE_END(DECODER);
|
||||
|
||||
data->flag_construct_called = 1;
|
||||
ok = (rv > 0);
|
||||
if (ok)
|
||||
if (ok) {
|
||||
data->flag_construct_called = 1;
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
/* The constructor didn't return success */
|
||||
|
Loading…
Reference in New Issue
Block a user