Add check for the return value of OPENSSL_zalloc() to avoid potential NULL pointer dereference.
Fixes: 2858149e44 ("Adding an hq-interop alpn client")
Signed-off-by: Jiasheng Jiang <jiashengjiangcool@gmail.com>
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/27915)
goto end;
}
+ if (reqnames == NULL) {
+ fprintf(stderr, "Failed to allocate memory for request names\n");
+ goto end;
+ }
+
hostname = argv[argnext++];
port = argv[argnext++];
reqfile = argv[argnext];