diff options
author | André Fabian Silva Delgado <emulatorman@lavabit.com> | 2013-07-09 17:35:59 -0300 |
---|---|---|
committer | André Fabian Silva Delgado <emulatorman@lavabit.com> | 2013-07-09 17:35:59 -0300 |
commit | 98a222ae9c353e43c3ae018ec7c555bd8581de5d (patch) | |
tree | 840616f7d0352d21355a8de4819b42be86124d88 /cross/xtensa-unknown-elf-glibc/glibc-2.17-getaddrinfo-stack-overflow.patch | |
parent | 237322161f12b666e9cb00bd3dab761fd46802e1 (diff) |
removing xtensa-unknown-elf-glibc and editing path on xtensa-unknown-elf-linux-libre-api-headers
Diffstat (limited to 'cross/xtensa-unknown-elf-glibc/glibc-2.17-getaddrinfo-stack-overflow.patch')
-rw-r--r-- | cross/xtensa-unknown-elf-glibc/glibc-2.17-getaddrinfo-stack-overflow.patch | 47 |
1 files changed, 0 insertions, 47 deletions
diff --git a/cross/xtensa-unknown-elf-glibc/glibc-2.17-getaddrinfo-stack-overflow.patch b/cross/xtensa-unknown-elf-glibc/glibc-2.17-getaddrinfo-stack-overflow.patch deleted file mode 100644 index aa916ac2c..000000000 --- a/cross/xtensa-unknown-elf-glibc/glibc-2.17-getaddrinfo-stack-overflow.patch +++ /dev/null @@ -1,47 +0,0 @@ -diff --git a/sysdeps/posix/getaddrinfo.c b/sysdeps/posix/getaddrinfo.c -index d95c2d1..2309281 100644 ---- a/sysdeps/posix/getaddrinfo.c -+++ b/sysdeps/posix/getaddrinfo.c -@@ -2489,11 +2489,27 @@ getaddrinfo (const char *name, const char *service, - __typeof (once) old_once = once; - __libc_once (once, gaiconf_init); - /* Sort results according to RFC 3484. */ -- struct sort_result results[nresults]; -- size_t order[nresults]; -+ struct sort_result *results; -+ size_t *order; - struct addrinfo *q; - struct addrinfo *last = NULL; - char *canonname = NULL; -+ bool malloc_results; -+ -+ malloc_results -+ = !__libc_use_alloca (nresults * (sizeof (*results) + sizeof (size_t))); -+ if (malloc_results) -+ { -+ results = malloc (nresults * (sizeof (*results) + sizeof (size_t))); -+ if (results == NULL) -+ { -+ __free_in6ai (in6ai); -+ return EAI_MEMORY; -+ } -+ } -+ else -+ results = alloca (nresults * (sizeof (*results) + sizeof (size_t))); -+ order = (size_t *) (results + nresults); - - /* Now we definitely need the interface information. */ - if (! check_pf_called) -@@ -2664,6 +2680,9 @@ getaddrinfo (const char *name, const char *service, - - /* Fill in the canonical name into the new first entry. */ - p->ai_canonname = canonname; -+ -+ if (malloc_results) -+ free (results); - } - - __free_in6ai (in6ai); --- -1.7.1 - |