2
0
mirror of https://github.com/openssl/openssl.git synced 2025-04-24 20:51:14 +08:00

apps/speed.c: add verifying if fdopen returns NULL

Reviewed-by: Todd Short <todd.short@me.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/19651)
This commit is contained in:
Vinz2008 2022-11-10 18:36:44 +01:00 committed by Tomas Mraz
parent d55fc027b9
commit c9a542e418

@ -3508,7 +3508,11 @@ static int do_multi(int multi, int size_num)
char buf[1024];
char *p;
f = fdopen(fds[n], "r");
if ((f = fdopen(fds[n], "r")) == NULL) {
BIO_printf(bio_err, "fdopen failure with 0x%x\n",
errno);
return 1;
}
while (fgets(buf, sizeof(buf), f)) {
p = strchr(buf, '\n');
if (p)