void-packages/srcpkgs/glibc/patches/glibc-upstream-01.patch
2017-10-10 15:39:48 +00:00

58 lines
1.8 KiB
Diff
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

From dc258ce62ae0bbb456c6a855dbb6b384ecf7e988 Mon Sep 17 00:00:00 2001
From: Florian Weimer <fweimer@redhat.com>
Date: Thu, 3 Aug 2017 13:59:17 +0200
Subject: [PATCH 01] getaddrinfo: Release resolver context on error in
gethosts [BZ #21885]
(cherry picked from commit 964263bb8d650f1681665c55704fb01a8e725621)
---
ChangeLog | 6 ++++++
NEWS | 6 ++++++
sysdeps/posix/getaddrinfo.c | 2 ++
3 files changed, 14 insertions(+)
diff --git a/ChangeLog b/ChangeLog
index 8dbfc7eaff..28ce9c8479 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2017-08-03 Florian Weimer <fweimer@redhat.com>
+
+ [BZ #21885]
+ * sysdeps/posix/getaddrinfo.c (gethosts): Release resolver context
+ on memory allocation failure.
+
2017-08-02 Siddhesh Poyarekar <siddhesh@sourceware.org>
* version.h (RELEASE): Set to "stable"
diff --git a/NEWS b/NEWS
index 8295f20c0a..9a64579658 100644
--- a/NEWS
+++ b/NEWS
@@ -5,6 +5,12 @@ See the end for copying conditions.
Please send GNU C library bug reports via <http://sourceware.org/bugzilla/>
using `glibc' in the "product" field.
+Version 2.26.1
+
+The following bugs are resolved with this release:
+
+ [21885] getaddrinfo: Release resolver context on error in gethosts
+
Version 2.26
Major new features:
diff --git a/sysdeps/posix/getaddrinfo.c b/sysdeps/posix/getaddrinfo.c
index efa7118498..699411cc92 100644
--- a/sysdeps/posix/getaddrinfo.c
+++ b/sysdeps/posix/getaddrinfo.c
@@ -255,6 +255,8 @@ convert_hostent_to_gaih_addrtuple (const struct addrinfo *req,
break; \
if (!scratch_buffer_grow (tmpbuf)) \
{ \
+ __resolv_context_enable_inet6 (res_ctx, res_enable_inet6); \
+ __resolv_context_put (res_ctx); \
result = -EAI_MEMORY; \
goto free_and_return; \
} \