diff options
author | takeshi_hoshina <takeshi_hoshina@mail.toyota.co.jp> | 2020-11-02 11:07:33 +0900 |
---|---|---|
committer | takeshi_hoshina <takeshi_hoshina@mail.toyota.co.jp> | 2020-11-02 11:07:33 +0900 |
commit | 1c7d6584a7811b7785ae5c1e378f14b5ba0971cf (patch) | |
tree | cd70a267a5ef105ba32f200aa088e281fbd85747 /external/poky/meta/recipes-core/glibc/glibc/0002-nativesdk-glibc-Fix-buffer-overrun-with-a-relocated-.patch | |
parent | 4204309872da5cb401cbb2729d9e2d4869a87f42 (diff) |
basesystem-jjsandbox/ToshikazuOhiwa/master-jj
recipes
Diffstat (limited to 'external/poky/meta/recipes-core/glibc/glibc/0002-nativesdk-glibc-Fix-buffer-overrun-with-a-relocated-.patch')
-rw-r--r-- | external/poky/meta/recipes-core/glibc/glibc/0002-nativesdk-glibc-Fix-buffer-overrun-with-a-relocated-.patch | 46 |
1 files changed, 0 insertions, 46 deletions
diff --git a/external/poky/meta/recipes-core/glibc/glibc/0002-nativesdk-glibc-Fix-buffer-overrun-with-a-relocated-.patch b/external/poky/meta/recipes-core/glibc/glibc/0002-nativesdk-glibc-Fix-buffer-overrun-with-a-relocated-.patch deleted file mode 100644 index daadec76..00000000 --- a/external/poky/meta/recipes-core/glibc/glibc/0002-nativesdk-glibc-Fix-buffer-overrun-with-a-relocated-.patch +++ /dev/null @@ -1,46 +0,0 @@ -From fdc8a33ac2c81a0237b8a6d8b1aac7f1cdbb46af Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Wed, 18 Mar 2015 01:50:00 +0000 -Subject: [PATCH] nativesdk-glibc: Fix buffer overrun with a relocated SDK - -When ld-linux-*.so.2 is relocated to a path that is longer than the -original fixed location, the dynamic loader will crash in open_path -because it implicitly assumes that max_dirnamelen is a fixed size that -never changes. - -The allocated buffer will not be large enough to contain the directory -path string which is larger than the fixed location provided at build -time. - -Upstream-Status: Inappropriate [OE SDK specific] - -Signed-off-by: Jason Wessel <jason.wessel@windriver.com> -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- - elf/dl-load.c | 12 ++++++++++++ - 1 file changed, 12 insertions(+) - -diff --git a/elf/dl-load.c b/elf/dl-load.c -index 44bbb69dc4..74e2e5e962 100644 ---- a/elf/dl-load.c -+++ b/elf/dl-load.c -@@ -1785,7 +1785,19 @@ open_path (const char *name, size_t namelen, int mode, - given on the command line when rtld is run directly. */ - return -1; - -+ do -+ { -+ struct r_search_path_elem *this_dir = *dirs; -+ if (this_dir->dirnamelen > max_dirnamelen) -+ { -+ max_dirnamelen = this_dir->dirnamelen; -+ } -+ } -+ while (*++dirs != NULL); -+ - buf = alloca (max_dirnamelen + max_capstrlen + namelen); -+ -+ dirs = sps->dirs; - do - { - struct r_search_path_elem *this_dir = *dirs; |