unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
blob 5ddf767536baaf712ea482e28a2565151204d1ae 1864 bytes (raw)
name: gnu/packages/patches/glibc-2.26-resolver-fixes.patch 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
 
This patch fixes some problems in the glibc 2.26 resolver.

https://sourceware.org/bugzilla/show_bug.cgi?id=22095
https://sourceware.org/bugzilla/show_bug.cgi?id=22096

Picked from these commits:
https://sourceware.org/git/?p=glibc.git;a=commit;h=905a6129147e7ee80e8918e23efe212433b8cce7
https://sourceware.org/git/?p=glibc.git;a=commit;h=27233446a62ca35ce0b54566279a99a6774d4210

From 905a6129147e7ee80e8918e23efe212433b8cce7 Mon Sep 17 00:00:00 2001
From: Florian Weimer <fweimer@redhat.com>
Date: Wed, 6 Sep 2017 15:46:54 +0200
Subject: [PATCH] resolv: Fix memory leak with OOM during resolv.conf parsing
 [BZ #22095]
diff --git a/resolv/res_init.c b/resolv/res_init.c
index fa46ce7..4e1f9fe 100644
--- a/resolv/res_init.c
+++ b/resolv/res_init.c
@@ -446,6 +446,11 @@ res_vinit_1 (FILE *fp, struct resolv_conf_parser *parser)
                     (&parser->nameserver_list);
                   if (p != NULL)
                     *p = sa;
+                  else
+                    {
+                      free (sa);
+                      return false;
+                    }
                 }
               continue;
             }

From 27233446a62ca35ce0b54566279a99a6774d4210 Mon Sep 17 00:00:00 2001
From: Florian Weimer <fweimer@redhat.com>
Date: Wed, 6 Sep 2017 15:47:27 +0200
Subject: [PATCH] resolv: __resolv_conf_attach must not free passed conf object
 [BZ #22096]
diff --git a/resolv/resolv_conf.c b/resolv/resolv_conf.c
index f391d30c2..e0f296d 100644
--- a/resolv/resolv_conf.c
+++ b/resolv/resolv_conf.c
@@ -600,10 +600,7 @@ __resolv_conf_attach (struct __res_state *resp, struct resolv_conf *conf)
 
   struct resolv_conf_global *global_copy = get_locked_global ();
   if (global_copy == NULL)
-    {
-      free (conf);
-      return false;
-    }
+    return false;
 
   /* Try to find an unused index in the array.  */
   size_t index;

debug log:

solving 5ddf76753 ...
found 5ddf76753 in https://yhetil.org/guix-patches/87mv3eove6.fsf@fastmail.com/

applying [1/1] https://yhetil.org/guix-patches/87mv3eove6.fsf@fastmail.com/
diff --git a/gnu/packages/patches/glibc-2.26-resolver-fixes.patch b/gnu/packages/patches/glibc-2.26-resolver-fixes.patch
new file mode 100644
index 000000000..5ddf76753

1:48: trailing whitespace.
 
1:56: trailing whitespace.
 
Checking patch gnu/packages/patches/glibc-2.26-resolver-fixes.patch...
Applied patch gnu/packages/patches/glibc-2.26-resolver-fixes.patch cleanly.
warning: 2 lines add whitespace errors.

index at:
100644 5ddf767536baaf712ea482e28a2565151204d1ae	gnu/packages/patches/glibc-2.26-resolver-fixes.patch

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).