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
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/cygwin/spawn.cc')
-rw-r--r--winsup/cygwin/spawn.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/winsup/cygwin/spawn.cc b/winsup/cygwin/spawn.cc
index 6aef64440..0482a68c8 100644
--- a/winsup/cygwin/spawn.cc
+++ b/winsup/cygwin/spawn.cc
@@ -1169,6 +1169,8 @@ av::setup (const char *prog_arg, path_conv& real_path, const char *ext,
{
ptr += strspn (ptr, " \t");
size_t len = strcspn (ptr, "\r\n");
+ while (ptr[len - 1] == ' ' || ptr[len - 1] == '\t')
+ len--;
if (len)
{
char *namebuf = (char *) alloca (len + 1);