svn commit: trunk/uClibc/ldso/ldso

vapier at uclibc.org vapier at uclibc.org
Thu Jan 19 10:38:26 UTC 2006


Author: vapier
Date: 2006-01-19 02:38:25 -0800 (Thu, 19 Jan 2006)
New Revision: 13419

Log:
Frank Mehnert writes:
in ldso/ldso.c, function _dl_get_ready_to_run, the variable app_tpnt_tmp
is not initialized. The function _dl_parse_dynamic_info() initializes
some of their members but not all. For example, if the binary does _not_
contain a DT_TEXTREL record, it is possible that the condition
  if (app_tpnt->dynamic_info[DT_TEXTREL])
is nevertheless true and we therefore enter the following code path
(ldso.c:270).

My suggestion is to add
  _dl_memset(&app_tpnt_rel, 0, sizeof(app_tpnt_rel));
just behind the variable declarations of _dl_get_ready_to_run().


Modified:
   trunk/uClibc/ldso/ldso/ldso.c


Changeset:
Modified: trunk/uClibc/ldso/ldso/ldso.c
===================================================================
--- trunk/uClibc/ldso/ldso/ldso.c	2006-01-19 10:32:43 UTC (rev 13418)
+++ trunk/uClibc/ldso/ldso/ldso.c	2006-01-19 10:38:25 UTC (rev 13419)
@@ -139,6 +139,7 @@
 	 * setup so we can use _dl_dprintf() to print debug noise
 	 * instead of the SEND_STDERR macros used in dl-startup.c */
 
+	_dl_memset(&app_tpnt_rel, 0x00, sizeof(app_tpnt_rel));
 
 	/* Store the page size for later use */
 	_dl_pagesize = (auxvt[AT_PAGESZ].a_un.a_val) ? (size_t) auxvt[AT_PAGESZ].a_un.a_val : PAGE_SIZE;




More information about the uClibc-cvs mailing list