Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/winsup
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2006-04-24 20:42:07 +0400
committerChristopher Faylor <me@cgf.cx>2006-04-24 20:42:07 +0400
commita2649dc6512a57a48d3872546cf402e865c820c8 (patch)
treef3f6e1cbd0ff8157b68aea80e4498dc855011d49 /winsup
parentb4c53a7c00fed3bfc643d1fde86532cd1c654458 (diff)
* environ.cc (getearly): Force correct dereference order when inspecting
environ table.
Diffstat (limited to 'winsup')
-rw-r--r--winsup/cygwin/ChangeLog5
-rw-r--r--winsup/cygwin/environ.cc2
2 files changed, 6 insertions, 1 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index a04d0b4c7..708c51125 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,8 @@
+2006-04-24 Christopher Faylor <cgf@timesys.com>
+
+ * environ.cc (getearly): Force correct dereference order when
+ inspecting environ table.
+
2006-04-24 Corinna Vinschen <corinna@vinschen.de>
* select.cc (thread_pipe): Raise sleep time only every 8th iteration.
diff --git a/winsup/cygwin/environ.cc b/winsup/cygwin/environ.cc
index d391eb89f..3f6908ae5 100644
--- a/winsup/cygwin/environ.cc
+++ b/winsup/cygwin/environ.cc
@@ -233,7 +233,7 @@ getearly (const char * name, int *)
{
len = strlen (name);
for (; *ptr; ptr++)
- if (strncasematch (name, *ptr, len) && *ptr[len] == '=')
+ if (strncasematch (name, *ptr, len) && (*ptr)[len] == '=')
return *ptr + len + 1;
}
else if ((len = GetEnvironmentVariable (name, NULL, 0))