Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 75481 Details for
Bug 89381
glibc dynamic loader becomes confused when entry in LD_LIBRARY_PATH looks like a library it's trying to locate
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
glibc-dirs-are-not-elfs.patch
glibc-dirs-are-not-elfs.patch (text/plain), 872 bytes, created by
SpanKY
on 2005-12-24 22:08:36 UTC
(
hide
)
Description:
glibc-dirs-are-not-elfs.patch
Filename:
MIME Type:
Creator:
SpanKY
Created:
2005-12-24 22:08:36 UTC
Size:
872 bytes
patch
obsolete
>Make sure we don't abort when a directory is named the same as >a library that we are searching for. > >$ mkdir -p /tmp/lib/libc.so.6 >$ export LD_LIBRARY_PATH=/tmp/lib >$ ls >ls: error while loading shared libraries: /tmp/lib/libc.so.6: cannot read file data: Error 21 > >http://bugs.gentoo.org/89381 > >--- glibc/elf/dl-load.c >+++ glibc/elf/dl-load.c >@@ -1631,6 +1631,16 @@ open_verify (const char *name, struct fi > /* Now run the tests. */ > if (__builtin_expect (fbp->len < (ssize_t) sizeof (ElfW(Ehdr)), 0)) > { >+ /* Make sure this isn't a directory. >+ http://bugs.gentoo.org/89381 */ >+ struct stat64 st; >+ if (__fxstat64 (_STAT_VER, fd, &st) == 0 >+ && S_ISDIR(st.st_mode)) >+ { >+ __close (fd); >+ return -1; >+ } >+ > errval = errno; > errstring = (errval == 0 > ? N_("file too short") : N_("cannot read file data"));
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 89381
: 75481