mirror of
https://github.com/python/cpython.git
synced 2026-01-06 23:42:34 +00:00
gh-119070: Fix py.exe handling of /usr/bin/env commands missing extension (GH-119426)
(cherry picked from commit df93f5d4bf)
Co-authored-by: Steve Dower <steve.dower@python.org>
This commit is contained in:
parent
dcfbd3be9f
commit
c3cfc04a73
3 changed files with 12 additions and 1 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue