]> git.ipfire.org Git - thirdparty/openssl.git/blobdiff - crypto/params.c
params: avoid a core dump with a null pointer and a get string call
[thirdparty/openssl.git] / crypto / params.c
index 5d1fc6a6f2d1ea4290d172d593a7b7ab8bd17196..64d53c50e3a12d3263a3f07a548b42bb48fddb78 100644 (file)
@@ -778,6 +778,8 @@ static int get_string_internal(const OSSL_PARAM *p, void **val, size_t max_len,
 
     if (sz == 0)
         return 1;
+    if (p->data == NULL)
+        return 0;
 
     if (*val == NULL) {
         char *const q = OPENSSL_malloc(sz);