| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -520,16 +520,16 @@ Py_Main(int argc, wchar_t **argv) | |||
| 520 | 520 | #ifdef MS_WINDOWS | |
| 521 | 521 | if (!Py_IgnoreEnvironmentFlag && (wp = _wgetenv(L"PYTHONWARNINGS")) && | |
| 522 | 522 | *wp != L'\0') { | |
| 523 | - wchar_t *buf, *warning; | ||
| 523 | + wchar_t *buf, *warning, *context = NULL; | ||
| 524 | 524 | ||
| 525 | 525 | buf = (wchar_t *)PyMem_RawMalloc((wcslen(wp) + 1) * sizeof(wchar_t)); | |
| 526 | 526 | if (buf == NULL) | |
| 527 | 527 | Py_FatalError( | |
| 528 | 528 | "not enough memory to copy PYTHONWARNINGS"); | |
| 529 | 529 | wcscpy(buf, wp); | |
| 530 | - for (warning = wcstok(buf, L","); | ||
| 530 | + for (warning = wcstok_s(buf, L",", &context); | ||
| 531 | 531 | warning != NULL; | |
| 532 | - warning = wcstok(NULL, L",")) { | ||
| 532 | + warning = wcstok_s(NULL, L",", &context)) { | ||
| 533 | 533 | PySys_AddWarnOption(warning); | |
| 534 | 534 | } | |
| 535 | 535 | PyMem_RawFree(buf); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -451,11 +451,12 @@ find_env_config_value(FILE * env_file, const wchar_t * key, wchar_t * value) | |||
| 451 | 451 | tmpbuffer, MAXPATHLEN * 2); | |
| 452 | 452 | Py_DECREF(decoded); | |
| 453 | 453 | if (k >= 0) { | |
| 454 | - wchar_t * tok = wcstok(tmpbuffer, L" \t\r\n"); | ||
| 454 | + wchar_t * context = NULL; | ||
| 455 | + wchar_t * tok = wcstok_s(tmpbuffer, L" \t\r\n", &context); | ||
| 455 | 456 | if ((tok != NULL) && !wcscmp(tok, key)) { | |
| 456 | - tok = wcstok(NULL, L" \t"); | ||
| 457 | + tok = wcstok_s(NULL, L" \t", &context); | ||
| 457 | 458 | if ((tok != NULL) && !wcscmp(tok, L"=")) { | |
| 458 | - tok = wcstok(NULL, L"\r\n"); | ||
| 459 | + tok = wcstok_s(NULL, L"\r\n", &context); | ||
| 459 | 460 | if (tok != NULL) { | |
| 460 | 461 | wcsncpy(value, tok, MAXPATHLEN); | |
| 461 | 462 | result = 1; | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -67,7 +67,7 @@ | |||
| 67 | 67 | <ClCompile> | |
| 68 | 68 | <AdditionalOptions>/Zm200 %(AdditionalOptions)</AdditionalOptions> | |
| 69 | 69 | <AdditionalIncludeDirectories>$(PySourcePath)Python;$(PySourcePath)Modules\zlib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> | |
| 70 | - <PreprocessorDefinitions>_CRT_NON_CONFORMING_WCSTOK;_USRDLL;Py_BUILD_CORE;Py_ENABLE_SHARED;MS_DLL_ID="$(SysWinVer)";%(PreprocessorDefinitions)</PreprocessorDefinitions> | ||
| 70 | + <PreprocessorDefinitions>_USRDLL;Py_BUILD_CORE;Py_ENABLE_SHARED;MS_DLL_ID="$(SysWinVer)";%(PreprocessorDefinitions)</PreprocessorDefinitions> | ||
| 71 | 71 | </ClCompile> | |
| 72 | 72 | <Link> | |
| 73 | 73 | <AdditionalDependencies>ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies> | |
| Back | FazBrowse Home | New Git URL |
0 commit comments