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:
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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user