mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
Fix some missing null checks. (GH-118721)
This commit is contained in:
parent
17a2cc199d
commit
7e6fcab200
2 changed files with 15 additions and 7 deletions
|
@ -2707,6 +2707,11 @@ process(int argc, wchar_t ** argv)
|
|||
DWORD len = GetEnvironmentVariableW(L"PYLAUNCHER_LIMIT_TO_COMPANY", NULL, 0);
|
||||
if (len > 1) {
|
||||
wchar_t *limitToCompany = allocSearchInfoBuffer(&search, len);
|
||||
if (!limitToCompany) {
|
||||
exitCode = RC_NO_MEMORY;
|
||||
winerror(0, L"Failed to allocate internal buffer");
|
||||
goto abort;
|
||||
}
|
||||
search.limitToCompany = limitToCompany;
|
||||
if (0 == GetEnvironmentVariableW(L"PYLAUNCHER_LIMIT_TO_COMPANY", limitToCompany, len)) {
|
||||
exitCode = RC_INTERNAL_ERROR;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue