decoder_process: data_structure can be NULL

Check it before dereferencing.

Fixes #14530

Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/14531)
This commit is contained in:
Tomas Mraz 2021-03-12 16:35:28 +01:00
parent 1e08f3ba9e
commit a8275fbc4a

View File

@ -608,7 +608,7 @@ static int decoder_process(const OSSL_PARAM params[], void *arg)
* too special knowledge.
*/
trace_data_structure = data_structure;
if (data_type != NULL
if (data_type != NULL && data_structure != NULL
&& strcasecmp(data_structure, "type-specific") == 0)
data_structure = NULL;