diff options
Diffstat (limited to 'crypto/params.c')
-rw-r--r-- | crypto/params.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/crypto/params.c b/crypto/params.c index b3fbb12b9b..20082ad90b 100644 --- a/crypto/params.c +++ b/crypto/params.c @@ -808,6 +808,8 @@ int OSSL_PARAM_set_octet_string(OSSL_PARAM *p, const void *val, OSSL_PARAM OSSL_PARAM_construct_utf8_string(const char *key, char *buf, size_t bsize) { + if (buf != NULL && bsize == 0) + bsize = strlen(buf) + 1; return ossl_param_construct(key, OSSL_PARAM_UTF8_STRING, buf, bsize); } |