diff options
author | Roland McGrath <roland@gnu.org> | 2002-11-15 22:51:30 +0000 |
---|---|---|
committer | Roland McGrath <roland@gnu.org> | 2002-11-15 22:51:30 +0000 |
commit | 92712dee6828b76b2646d853328cf030eacd36b1 (patch) | |
tree | c47fb508e31e6fdd4fef2bea5f1e9808632ff402 /stdlib | |
parent | 53da80ab8870138b81b212c540c32b5c1eeccaf4 (diff) | |
download | glibc-92712dee6828b76b2646d853328cf030eacd36b1.tar.gz glibc-92712dee6828b76b2646d853328cf030eacd36b1.tar.xz glibc-92712dee6828b76b2646d853328cf030eacd36b1.zip |
* sysdeps/i386/dl-machine.h (elf_machine_rela): Handle R_386_COPY.
* sysdeps/arm/dl-machine.h (elf_machine_rela): Handle R_ARM_COPY. 2002-11-15 Roland McGrath <roland@redhat.com> * math/Makefile (libm-calls): Change s_ldexp to m_ldexp. * Makerules ($(+sysdir_pfx)sysd-rules): Emit pattern rules for m_%.[Sc] from sysdeps/.../s_%.[Sc] with commands $(+make-include-of-dep). (+make-include-of-dep): New canned sequence. * stdlib/canonicalize.c (__realpath): Check for malloc failure. From Dmitry V. Levin <ldv@altlinux.org>.
Diffstat (limited to 'stdlib')
-rw-r--r-- | stdlib/canonicalize.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/stdlib/canonicalize.c b/stdlib/canonicalize.c index 3394048fb3..5c55c5dbd1 100644 --- a/stdlib/canonicalize.c +++ b/stdlib/canonicalize.c @@ -73,7 +73,14 @@ __realpath (const char *name, char *resolved) path_max = 1024; #endif - rpath = resolved ? __alloca (path_max) : malloc (path_max); + if (resolved == NULL) + { + rpath = malloc (path_max); + if (rpath == NULL) + return NULL; + } + else + rpath = resolved; rpath_limit = rpath + path_max; if (name[0] != '/') |