Allow short reads in asn1_d2i_read_bio()

Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Paul Dale <ppzgs1@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/22486)
This commit is contained in:
Tomas Mraz 2023-10-24 09:27:23 +02:00
parent 0d4663ca6a
commit 202ef97edc

View File

@ -148,6 +148,9 @@ int asn1_d2i_read_bio(BIO *in, BUF_MEM **pb)
goto err;
}
len += i;
if ((size_t)i < want)
continue;
}
}
/* else data already loaded */