]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Update.
authorUlrich Drepper <drepper@redhat.com>
Fri, 2 Jun 2000 07:30:28 +0000 (07:30 +0000)
committerUlrich Drepper <drepper@redhat.com>
Fri, 2 Jun 2000 07:30:28 +0000 (07:30 +0000)
2000-06-02  Ulrich Drepper  <drepper@redhat.com>

* elf/rtld.c (process_envvars): Test for = after variable name.

ChangeLog
elf/rtld.c

index 4100b0ceba531af9653ab0f283600f0e25086fca..de4529d79657cbdd482b01d7867e2c16427fc559 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2000-06-02  Ulrich Drepper  <drepper@redhat.com>
+
+       * elf/rtld.c (process_envvars): Test for = after variable name.
+
 2000-06-01  Ulrich Drepper  <drepper@redhat.com>
 
        * sysdeps/generic/initfini.c (_init): One less relocation.  Don't
index b41a90f3ece6b713aff72d7ac2546550503207e0..f35870046660797bfd1b773444cd609ca0e1bc75 100644 (file)
@@ -1324,9 +1324,15 @@ process_envvars (enum mode *modep, int *lazyp)
 
   while ((envline = _dl_next_ld_env_entry (&runp)) != NULL)
     {
-      size_t len = strcspn (envline, "=") - 3;
+      size_t len = strcspn (envline, "=");
 
-      switch (len)
+      if (envline[len] != '=')
+       /* This is a "LD_" variable at the end of the string without
+          a '=' character.  Ignore it since otherwise we will access
+          invalid memory below.  */
+       break;
+
+      switch (len - 3)
        {
        case 4:
          /* Warning level, verbose or not.  */