diff options
author | Jakub Jelinek <jakub@redhat.com> | 2006-04-24 08:55:46 +0000 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2006-04-24 08:55:46 +0000 |
commit | d0145e03799e484f3a53d79de3b3f34162ee9d3c (patch) | |
tree | d8c51a0952204f9015de0db3319d4c820e8646e0 /elf | |
parent | f5ce81c94cc27035f44d37bffa7f7e08dbce7631 (diff) | |
download | glibc-d0145e03799e484f3a53d79de3b3f34162ee9d3c.tar.gz |
Updated to fedora-glibc-20060424T0820
Diffstat (limited to 'elf')
-rw-r--r-- | elf/cache.c | 13 | ||||
-rw-r--r-- | elf/ldconfig.c | 2 | ||||
-rw-r--r-- | elf/ldd.bash.in | 5 | ||||
-rw-r--r-- | elf/rtld.c | 2 |
4 files changed, 13 insertions, 9 deletions
diff --git a/elf/cache.c b/elf/cache.c index 9462ac1b53..6730fb36eb 100644 --- a/elf/cache.c +++ b/elf/cache.c @@ -1,5 +1,4 @@ -/* Copyright (C) 1999,2000,2001,2002,2003,2005 - Free Software Foundation, Inc. +/* Copyright (C) 1999-2003,2005,2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Andreas Jaeger <aj@suse.de>, 1999. @@ -421,7 +420,7 @@ save_cache (const char *cache_name) if (opt_format != 2) { if (write (fd, file_entries, file_entries_size) - != (ssize_t)file_entries_size) + != (ssize_t) file_entries_size) error (EXIT_FAILURE, errno, _("Writing of cache data failed")); } if (opt_format != 0) @@ -430,15 +429,16 @@ save_cache (const char *cache_name) if (opt_format != 2) { char zero[pad]; - if (write (fd, zero, pad) != (ssize_t)pad) + memset (zero, '\0', pad); + if (write (fd, zero, pad) != (ssize_t) pad) error (EXIT_FAILURE, errno, _("Writing of cache data failed")); } if (write (fd, file_entries_new, file_entries_new_size) - != (ssize_t)file_entries_new_size) + != (ssize_t) file_entries_new_size) error (EXIT_FAILURE, errno, _("Writing of cache data failed")); } - if (write (fd, strings, total_strlen) != (ssize_t)total_strlen) + if (write (fd, strings, total_strlen) != (ssize_t) total_strlen) error (EXIT_FAILURE, errno, _("Writing of cache data failed.")); close (fd); @@ -455,6 +455,7 @@ save_cache (const char *cache_name) cache_name); /* Free all allocated memory. */ + free (file_entries_new); free (file_entries); free (strings); diff --git a/elf/ldconfig.c b/elf/ldconfig.c index 795fe6374f..6800272ac7 100644 --- a/elf/ldconfig.c +++ b/elf/ldconfig.c @@ -1205,7 +1205,7 @@ main (int argc, char **argv) if (opt_chroot) { /* Normalize the path a bit, we might need it for printing later. */ - char *endp = strchr (opt_chroot, '\0'); + char *endp = rawmemchr (opt_chroot, '\0'); while (endp > opt_chroot && endp[-1] == '/') --endp; *endp = '\0'; diff --git a/elf/ldd.bash.in b/elf/ldd.bash.in index 100d2335d2..a22ad15b59 100644 --- a/elf/ldd.bash.in +++ b/elf/ldd.bash.in @@ -144,9 +144,12 @@ for file do *) file=./$file ;; esac - if test ! -f "$file"; then + if test ! -e "$file"; then echo "ldd: ${file}:" $"No such file or directory" >&2 result=1 + elif test ! -f "$file"; then + echo "ldd: ${file}:" $"not regular file" >&2 + result=1 elif test -r "$file"; then test -x "$file" || echo 'ldd:' $"\ warning: you do not have execution permission for" "\`$file'" >&2 diff --git a/elf/rtld.c b/elf/rtld.c index 68fe809700..9a21b8bc6f 100644 --- a/elf/rtld.c +++ b/elf/rtld.c @@ -2624,7 +2624,7 @@ process_envvars (enum mode *modep) } if (memcmp (envline, "POINTER_GUARD", 13) == 0) - GLRO(dl_pointer_guard) = envline[14] == '0'; + GLRO(dl_pointer_guard) = envline[14] != '0'; break; case 14: |