Fix OSSL_PARAM_allocate_from_text() for OSSL_PARAM_UTF8_STRING
OSSL_PARAM_allocate_from_text() was still setting the length in bytes
of the UTF8 string to include the terminating NUL byte, while recent
changes excludes that byte from the length.
@@ -151,6 +151,8 @@ static int construct_from_text(OSSL_PARAM *to, const OSSL_PARAM *paramdef,
#else
strncpy(buf, value, buf_n);
#endif
+ /* Don't count the terminating NUL byte as data */
+ buf_n--;
break;
case OSSL_PARAM_OCTET_STRING:
if (ishex) {
