JSON_ENC: Fix initial value of error

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22037)
This commit is contained in:
Hugo Landau 2024-01-29 12:37:10 +00:00
parent c55e144b89
commit 67f997697a

View File

@ -233,7 +233,7 @@ int ossl_json_init(OSSL_JSON_ENC *json, BIO *bio, uint32_t flags)
{
memset(json, 0, sizeof(*json));
json->flags = flags;
json->error = 1;
json->error = 0;
if (!wbuf_init(&json->wbuf, bio, 4096))
return 0;