SHA256
1
0
forked from pool/glibc

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
This commit is contained in:
Andreas Schwab 2018-03-28 13:15:01 +00:00 committed by Git OBS Bridge
parent ef65d0fef2
commit 151fbc5a4d
3 changed files with 29 additions and 0 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Tue Mar 27 11:30:49 UTC 2018 - schwab@suse.de
- res-send-enomem.patch: Fix crash in resolver on memory allocation
failure (bsc#1086690, BZ #23005)
-------------------------------------------------------------------
Thu Mar 22 09:48:53 UTC 2018 - schwab@suse.de

View File

@ -300,6 +300,8 @@ Patch1007: i386-sigaction-sa-restorer.patch
Patch1008: riscv-tls-init.patch
# PATCH-FIX-UPSTREAM RISC-V: fmax/fmin: Handle signalling NaNs correctly (BZ #22884)
Patch1009: riscv-fmax-fmin-nan.patch
# PATCH-FIX-UPSTREAM Fix crash in resolver on memory allocation failure (BZ #23005)
Patch1010: res-send-enomem.patch
###
# Patches awaiting upstream approval
@ -519,6 +521,7 @@ mv crypt_blowfish-%crypt_bf_version/*.[chS] crypt/
%patch1007 -p1
%patch1008 -p1
%patch1009 -p1
%patch1010 -p1
%patch2000 -p1
%patch2004 -p1

20
res-send-enomem.patch Normal file
View File

@ -0,0 +1,20 @@
[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;
}