diff options
author | Ulrich Drepper <drepper@redhat.com> | 2002-02-04 17:55:52 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2002-02-04 17:55:52 +0000 |
commit | e2290bf5edaa0aeb58925e473ca9d761c802e3a8 (patch) | |
tree | 0afce6d678ef0a170c4cf49e3df4c0ca4b4a8cef /elf | |
parent | d1345b85f0020cb8ed15365d464bc527b92e2e5c (diff) | |
download | glibc-e2290bf5edaa0aeb58925e473ca9d761c802e3a8.tar.gz glibc-e2290bf5edaa0aeb58925e473ca9d761c802e3a8.tar.xz glibc-e2290bf5edaa0aeb58925e473ca9d761c802e3a8.zip |
(is_dst): Fix return value as expected by caller.
Diffstat (limited to 'elf')
-rw-r--r-- | elf/dl-load.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/elf/dl-load.c b/elf/dl-load.c index 439a8444cf..fc098a7497 100644 --- a/elf/dl-load.c +++ b/elf/dl-load.c @@ -165,16 +165,16 @@ is_dst (const char *start, const char *name, const char *str, size_t cmplen, size_t len; if (strncmp (name, str, cmplen) == 0) - len = cmplen + 1; + len = cmplen; else if (strncmp (name, str + 1, cmplen - 2) == 0 && (name[cmplen - 2] == '\0' || name[cmplen - 2] == '/' || (is_path && name[cmplen - 2] == ':'))) - len = cmplen - 1; + len = cmplen - 2; else return 0; if (__builtin_expect (secure, 0) - && ((name[len - 1] != '\0' && (!is_path || name[len - 1] != ':')) + && ((name[len] != '\0' && (!is_path || name[len] != ':')) || (name != start + 1 && (!is_path || name[-2] != ':')))) return 0; |