From 372c6c70283507af243013941f7575a01c9d94a9 Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Fri, 28 Jan 2022 10:20:31 +0900 Subject: [PATCH] test: add missing oom check Fixes CID#1469129. --- src/resolve/test-resolved-stream.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/resolve/test-resolved-stream.c b/src/resolve/test-resolved-stream.c index fd7ade19d1..50173389dd 100644 --- a/src/resolve/test-resolved-stream.c +++ b/src/resolve/test-resolved-stream.c @@ -130,7 +130,7 @@ static void *tls_dns_server(void *p) { assert_se(in_addr_to_string(SERVER_ADDRESS.sin_family, &(union in_addr_union){.in = SERVER_ADDRESS.sin_addr}, &ip_str) >= 0); - asprintf(&bind_str, "%s:%d", ip_str, be16toh(SERVER_ADDRESS.sin_port)); + assert_se(asprintf(&bind_str, "%s:%d", ip_str, be16toh(SERVER_ADDRESS.sin_port)) >= 0); /* We will hook one of the socketpair ends to OpenSSL's TLS server * stdin/stdout, so we will be able to read and write plaintext -- 2.25.1