summaryrefslogtreecommitdiffstats
path: root/PC
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2024-05-29 20:06:38 (GMT)
committerGitHub <noreply@github.com>2024-05-29 20:06:38 (GMT)
commitc3cfc04a736111cb61883cef08469ea46f86d9ce (patch)
tree75f72ec6beb5a13c0b6fd7651591ce5eba95e587 /PC
parentdcfbd3be9f1e0ba7aa32214e8f5f7f2ea4375a28 (diff)
downloadcpython-c3cfc04a736111cb61883cef08469ea46f86d9ce.zip
cpython-c3cfc04a736111cb61883cef08469ea46f86d9ce.tar.gz
cpython-c3cfc04a736111cb61883cef08469ea46f86d9ce.tar.bz2
gh-119070: Fix py.exe handling of /usr/bin/env commands missing extension (GH-119426)
(cherry picked from commit df93f5d4bf9d70036d485666d4dd4f009d37f8b9) Co-authored-by: Steve Dower <steve.dower@python.org>
Diffstat (limited to 'PC')
-rw-r--r--PC/launcher2.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/PC/launcher2.c b/PC/launcher2.c
index 9823161..b372044 100644
--- a/PC/launcher2.c
+++ b/PC/launcher2.c
@@ -853,7 +853,7 @@ searchPath(SearchInfo *search, const wchar_t *shebang, int shebangLength)
}
wchar_t filename[MAXLEN];
- if (wcsncpy_s(filename, MAXLEN, command, lastDot)) {
+ if (wcsncpy_s(filename, MAXLEN, command, commandLength)) {
return RC_BAD_VIRTUAL_PATH;
}