Latest update (add quic)
This commit is contained in:
+3
-4
@@ -788,8 +788,6 @@ static int get_string_internal(const OSSL_PARAM *p, void **val, size_t max_len,
|
||||
if (used_len != NULL)
|
||||
*used_len = sz;
|
||||
|
||||
if (sz == 0)
|
||||
return 1;
|
||||
if (p->data == NULL)
|
||||
return 0;
|
||||
|
||||
@@ -797,12 +795,13 @@ static int get_string_internal(const OSSL_PARAM *p, void **val, size_t max_len,
|
||||
return 1;
|
||||
|
||||
if (*val == NULL) {
|
||||
char *const q = OPENSSL_malloc(sz);
|
||||
char *const q = OPENSSL_malloc(sz > 0 ? sz : 1);
|
||||
|
||||
if (q == NULL)
|
||||
return 0;
|
||||
*val = q;
|
||||
memcpy(q, p->data, sz);
|
||||
if (sz != 0)
|
||||
memcpy(q, p->data, sz);
|
||||
return 1;
|
||||
}
|
||||
if (max_len < sz)
|
||||
|
||||
Reference in New Issue
Block a user