From f178e59fa5eefbbd37fde040ae8334aa5c857ee1 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Tue, 27 Mar 2018 12:16:11 +0200 Subject: Fix crash in resolver on memory allocation failure (bug 23005) --- resolv/res_send.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'resolv') diff --git a/resolv/res_send.c b/resolv/res_send.c index dde0425..7debf14 100644 --- a/resolv/res_send.c +++ b/resolv/res_send.c @@ -471,6 +471,11 @@ __res_context_send (struct resolv_context *ctx, '\0', sizeof (struct sockaddr_in6) - sizeof (struct sockaddr_in)); + else + { + __set_errno (ENOMEM); + return -1; + } } EXT(statp).nscount = statp->nscount; } -- cgit v1.1