arrfab / rpms / glibc

Forked from rpms/glibc 5 years ago
Clone

Blame SOURCES/glibc-rh1540480-2.patch

147e83
commit bb195224acc14724e9fc2dbaa8d0b20b72ace79b
147e83
Author: Dmitry V. Levin <ldv@altlinux.org>
147e83
Date:   Sun Dec 17 23:49:46 2017 +0000
147e83
147e83
    elf: do not substitute dst in $LD_LIBRARY_PATH twice [BZ #22627]
147e83
147e83
Index: glibc-2.17-c758a686/elf/dl-load.c
147e83
===================================================================
147e83
--- glibc-2.17-c758a686.orig/elf/dl-load.c
147e83
+++ glibc-2.17-c758a686/elf/dl-load.c
147e83
@@ -829,25 +829,7 @@ _dl_init_paths (const char *llp)
147e83
 
147e83
   if (llp != NULL && *llp != '\0')
147e83
     {
147e83
-      char *llp_tmp;
147e83
-
147e83
-#ifdef SHARED
147e83
-      /* Expand DSTs.  */
147e83
-      size_t cnt = DL_DST_COUNT (llp, 1);
147e83
-      if (__builtin_expect (cnt == 0, 1))
147e83
-	llp_tmp = strdupa (llp);
147e83
-      else
147e83
-	{
147e83
-	  /* Determine the length of the substituted string.  */
147e83
-	  size_t total = DL_DST_REQUIRED (l, llp, strlen (llp), cnt);
147e83
-
147e83
-	  /* Allocate the necessary memory.  */
147e83
-	  llp_tmp = (char *) alloca (total + 1);
147e83
-	  llp_tmp = _dl_dst_substitute (l, llp, llp_tmp, 1);
147e83
-	}
147e83
-#else
147e83
-      llp_tmp = strdupa (llp);
147e83
-#endif
147e83
+      char *llp_tmp = strdupa (llp);
147e83
 
147e83
       /* Decompose the LD_LIBRARY_PATH contents.  First determine how many
147e83
 	 elements it has.  */