forked from pool/glibc
Andreas Schwab
151fbc5a4d
- res-send-enomem.patch: Fix crash in resolver on memory allocation failure (bsc#1086690, BZ #23005) OBS-URL: https://build.opensuse.org/request/show/592049 OBS-URL: https://build.opensuse.org/package/show/Base:System/glibc?expand=0&rev=501
21 lines
569 B
Diff
21 lines
569 B
Diff
[BZ #23005]
|
|
* resolv/res_send.c (__res_context_send): Return ENOMEM if
|
|
allocation of private copy of nsaddr_list fails.
|
|
|
|
Index: glibc-2.27/resolv/res_send.c
|
|
===================================================================
|
|
--- glibc-2.27.orig/resolv/res_send.c
|
|
+++ glibc-2.27/resolv/res_send.c
|
|
@@ -471,6 +471,11 @@ __res_context_send (struct resolv_contex
|
|
'\0',
|
|
sizeof (struct sockaddr_in6)
|
|
- sizeof (struct sockaddr_in));
|
|
+ else
|
|
+ {
|
|
+ __set_errno (ENOMEM);
|
|
+ return -1;
|
|
+ }
|
|
}
|
|
EXT(statp).nscount = statp->nscount;
|
|
}
|