SHA256
1
0
forked from pool/glibc
glibc/res-send-enomem.patch

21 lines
569 B
Diff
Raw Normal View History

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