From 7264068a15e7c4955efa25753430595a45caa16f Mon Sep 17 00:00:00 2001 From: Peiwei Hu Date: Sun, 14 Nov 2021 16:55:45 +0800 Subject: [PATCH] BIO_gets: fix the incomplete return check Reviewed-by: Paul Dale Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/17028) --- test/danetest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- 2.47.2