about summary refs log tree commit diff
path: root/posix
diff options
context:
space:
mode:
Diffstat (limited to 'posix')
-rw-r--r--posix/wordexp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/posix/wordexp.c b/posix/wordexp.c
index 51cdc93df5..1c69af8a1c 100644
--- a/posix/wordexp.c
+++ b/posix/wordexp.c
@@ -1377,7 +1377,7 @@ envsubst:
 	      if (s == NULL)
 		return WRDE_NOSPACE;
 	      *word = memcpy (s, __libc_argv[p], len);
-	      *max_length = *word_length = len;
+	      *max_length = *word_length = len - 1;
 	    }
 	}