[kubicek@bitsmart.com] libc/2039: Bug+fix, ld-linux.so.2 segmentation fault, file elf/dl-load.c function _dl_init_paths
Andreas Jaeger
aj@suse.de
Tue Jan 23 00:39:00 GMT 2001
According to the manual the fix is correct, here's a patch. Ok to
commit?
Btw. I made a grep through the whole of glibc and didn't notice any
other problems.
Andreas
2001-01-23 Andreas Jaeger <aj@suse.de>
* elf/dl-load.c (_dl_init_paths): Don't use strdupa in function
arguments. Reported by Jiri Kubicek <kubicek@bitsmart.com>,
closes PR libc/2039.
============================================================
Index: elf/dl-load.c
--- elf/dl-load.c 2001/01/12 17:03:52 1.157
+++ elf/dl-load.c 2001/01/23 08:36:47
@@ -667,6 +667,7 @@
{
size_t nllp;
const char *cp = llp;
+ char *llp_tmp = strdupa (llp);
/* Decompose the LD_LIBRARY_PATH contents. First determine how many
elements it has. */
@@ -684,7 +685,7 @@
_dl_signal_error (ENOMEM, NULL,
N_("cannot create cache for search path"));
- (void) fillin_rpath (strdupa (llp), env_path_list.dirs, ":;",
+ (void) fillin_rpath (llp_tmp, env_path_list.dirs, ":;",
__libc_enable_secure, "LD_LIBRARY_PATH", NULL);
if (env_path_list.dirs[0] == NULL)
More information about the Libc-alpha
mailing list