SHA256
3
0
forked from pool/glibc
glibc/res-send-enomem.patch
Andreas Schwab 151fbc5a4d Accepting request 592049 from home:Andreas_Schwab:Factory
- 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
2018-03-28 13:15:01 +00:00

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;
}