This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[PATCH] Fix invalid free of memory allocated during rtld init
- From: Andreas Schwab <schwab at suse dot de>
- To: libc-alpha at sourceware dot org
- Date: Tue, 15 Jan 2013 17:04:43 +0100
- Subject: [PATCH] Fix invalid free of memory allocated during rtld init
Any memory allocated during rtld init cannot be freed.
Andreas.
[BZ #14293]
* elf/dl-load.c (_dl_init_paths): Mark decomposed RUNPATH as
non-freeable.
diff --git a/elf/dl-load.c b/elf/dl-load.c
index 6e65980..a3aab8a 100644
--- a/elf/dl-load.c
+++ b/elf/dl-load.c
@@ -797,6 +797,7 @@ _dl_init_paths (const char *llp)
(const void *) (D_PTR (l, l_info[DT_STRTAB])
+ l->l_info[DT_RUNPATH]->d_un.d_val),
l, "RUNPATH");
+ l->l_runpath_dirs.malloced = 0;
/* The RPATH is ignored. */
l->l_rpath_dirs.dirs = (void *) -1;
--
1.8.1
--
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."