From: Jiasheng Jiang Date: Thu, 26 Jun 2025 19:23:42 +0000 (+0000) Subject: test/quic-openssl-docker/hq-interop/quic-hq-interop.c: Add check for OPENSSL_zalloc() X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=efa2d85571a50c5a697677e3568007eb0d8dcbe7;p=thirdparty%2Fopenssl.git test/quic-openssl-docker/hq-interop/quic-hq-interop.c: Add check for OPENSSL_zalloc() 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 Reviewed-by: Neil Horman Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/27915) --- diff --git a/test/quic-openssl-docker/hq-interop/quic-hq-interop.c b/test/quic-openssl-docker/hq-interop/quic-hq-interop.c index 14375d178a7..823f1165a3f 100644 --- a/test/quic-openssl-docker/hq-interop/quic-hq-interop.c +++ b/test/quic-openssl-docker/hq-interop/quic-hq-interop.c @@ -883,6 +883,11 @@ int main(int argc, char *argv[]) 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];