params: avoid a core dump with a null pointer and a get string call
params: avoid a core dump with a null pointer and a get string call

Previous a get string (UTF8 or octet) params call would memcpy(2) from a NULL
pointer if the OSSL_PARAM didn't have its data field set.  This change makes
the operation fail rather than core dump and it returns to param size (if set).

Reviewed-by: Tomas Mraz <973cc78d8b4cb00714230ba9be0225e917ab4ac6@fedoraproject.org>
(Merged from https://github.com/openssl/openssl/pull/11474)

openssl/openssl,openssl/openssl,openssl/openssl,openssl/openssl,openssl/openssl,openssl/openssl