From: Peiwei Hu Date: Sun, 14 Nov 2021 08:55:45 +0000 (+0800) Subject: BIO_gets: fix the incomplete return check X-Git-Tag: openssl-3.2.0-alpha1~3312 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7264068a15e7c4955efa25753430595a45caa16f;p=thirdparty%2Fopenssl.git BIO_gets: fix the incomplete return check Reviewed-by: Paul Dale Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/17028) --- diff --git a/test/danetest.c b/test/danetest.c index 8af31aa34e4..0ed460039d4 100644 --- a/test/danetest.c +++ b/test/danetest.c @@ -152,7 +152,7 @@ static char *read_to_eol(BIO *f) static char buf[4096]; int n; - if (!BIO_gets(f, buf, sizeof(buf))) + if (BIO_gets(f, buf, sizeof(buf)) <= 0) return NULL; n = strlen(buf);