diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2001-03-14 15:32:49 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2001-03-14 15:32:49 +0000 |
commit | e212576dba4a3d9983dd5211b2cdb1e427d35fbb (patch) | |
tree | 4e2dd1fff1eb3ad7a1f5324ad1dac8f43777cd18 /winsup/cygwin/environ.cc | |
parent | 78d2c08cd9126d39c43c6110eca65bb53c798bd2 (diff) | |
download | cygnal-e212576dba4a3d9983dd5211b2cdb1e427d35fbb.tar.gz cygnal-e212576dba4a3d9983dd5211b2cdb1e427d35fbb.tar.bz2 cygnal-e212576dba4a3d9983dd5211b2cdb1e427d35fbb.zip |
* environ.cc (parse_options): Use strtok_r instead of strtok.
* security.cc (convert_string_sid_to_sid): Ditto.
(aclfromtext): Ditto. Fix buffer usage.
Diffstat (limited to 'winsup/cygwin/environ.cc')
-rw-r--r-- | winsup/cygwin/environ.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/winsup/cygwin/environ.cc b/winsup/cygwin/environ.cc index 77cf8da8d..a83c06e7e 100644 --- a/winsup/cygwin/environ.cc +++ b/winsup/cygwin/environ.cc @@ -465,7 +465,7 @@ static void __stdcall parse_options (char *buf) { int istrue; - char *p; + char *p, *lasts; parse_thing *k; if (buf == NULL) @@ -487,7 +487,9 @@ parse_options (char *buf) } buf = strcpy ((char *) alloca (strlen (buf) + 1), buf); - for (p = strtok (buf, " \t"); p != NULL; p = strtok (NULL, " \t")) + for (p = strtok_r (buf, " \t", &lasts); + p != NULL; + p = strtok_r (NULL, " \t", &lasts)) { if (!(istrue = !strncasematch (p, "no", 2))) p += 2; |