olga / rpms / glibc

Forked from rpms/glibc 5 years ago
Clone

Blame SOURCES/glibc-rh1579727-1.patch

25845f
commit f178e59fa5eefbbd37fde040ae8334aa5c857ee1
25845f
Author: Andreas Schwab <schwab@suse.de>
25845f
Date:   Tue Mar 27 12:16:11 2018 +0200
25845f
25845f
    Fix crash in resolver on memory allocation failure (bug 23005)
25845f
25845f
diff --git a/resolv/res_send.c b/resolv/res_send.c
25845f
index b396aae03c9eeb6e..01e4da4188b63d39 100644
25845f
--- a/resolv/res_send.c
25845f
+++ b/resolv/res_send.c
25845f
@@ -471,6 +471,11 @@ __res_context_send (struct resolv_context *ctx,
25845f
 					'\0',
25845f
 					sizeof (struct sockaddr_in6)
25845f
 					- sizeof (struct sockaddr_in));
25845f
+			else
25845f
+			  {
25845f
+			    __set_errno (ENOMEM);
25845f
+			    return -1;
25845f
+			  }
25845f
 		}
25845f
 		EXT(statp).nscount = statp->nscount;
25845f
 	}