diff options
Diffstat (limited to 'meta/recipes-core/glibc/glibc/0001-Linux-gethostid-Check-for-NULL-value-from-gethostbyn.patch')
-rw-r--r-- | meta/recipes-core/glibc/glibc/0001-Linux-gethostid-Check-for-NULL-value-from-gethostbyn.patch | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/meta/recipes-core/glibc/glibc/0001-Linux-gethostid-Check-for-NULL-value-from-gethostbyn.patch b/meta/recipes-core/glibc/glibc/0001-Linux-gethostid-Check-for-NULL-value-from-gethostbyn.patch deleted file mode 100644 index 3cf3266ba1..0000000000 --- a/meta/recipes-core/glibc/glibc/0001-Linux-gethostid-Check-for-NULL-value-from-gethostbyn.patch +++ /dev/null | |||
@@ -1,38 +0,0 @@ | |||
1 | From e7d22db29cfdd2f1fb97a70a76fa53d151569945 Mon Sep 17 00:00:00 2001 | ||
2 | From: Mingli Yu <Mingli.Yu@windriver.com> | ||
3 | Date: Thu, 20 Sep 2018 12:41:13 +0200 | ||
4 | Subject: [PATCH] Linux gethostid: Check for NULL value from gethostbyname_r [BZ #23679] | ||
5 | |||
6 | A NULL value can happen with certain gethostbyname_r failures. | ||
7 | |||
8 | (cherry picked from commit 1214ba06e6771acb953a190091b0f6055c64fd25) | ||
9 | |||
10 | Upstream-Status: Backport [https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=1214ba06e6771acb953a190091b0f6055c64fd25] | ||
11 | |||
12 | Signed-off-by: Mingli Yu <mingli.yu@windriver.com> | ||
13 | --- | ||
14 | sysdeps/unix/sysv/linux/gethostid.c | 4 ++-- | ||
15 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
16 | |||
17 | diff --git a/sysdeps/unix/sysv/linux/gethostid.c b/sysdeps/unix/sysv/linux/gethostid.c | ||
18 | index 2e20f034dc..ee0190e7f9 100644 | ||
19 | --- a/sysdeps/unix/sysv/linux/gethostid.c | ||
20 | +++ b/sysdeps/unix/sysv/linux/gethostid.c | ||
21 | @@ -102,12 +102,12 @@ gethostid (void) | ||
22 | { | ||
23 | int ret = __gethostbyname_r (hostname, &hostbuf, | ||
24 | tmpbuf.data, tmpbuf.length, &hp, &herr); | ||
25 | - if (ret == 0) | ||
26 | + if (ret == 0 && hp != NULL) | ||
27 | break; | ||
28 | else | ||
29 | { | ||
30 | /* Enlarge the buffer on ERANGE. */ | ||
31 | - if (herr == NETDB_INTERNAL && errno == ERANGE) | ||
32 | + if (ret != 0 && herr == NETDB_INTERNAL && errno == ERANGE) | ||
33 | { | ||
34 | if (!scratch_buffer_grow (&tmpbuf)) | ||
35 | return 0; | ||
36 | -- | ||
37 | 2.17.1 | ||
38 | |||