[issue32904] os.chdir() may crash on Windows in presence of races

2018-02-21 Thread Alexey Izbyshev
Change by Alexey Izbyshev : -- keywords: +patch pull_requests: +5580 stage: -> patch review ___ Python tracker ___

[issue32904] os.chdir() may crash on Windows in presence of races

2018-02-21 Thread Alexey Izbyshev
New submission from Alexey Izbyshev : win32_wchdir() retries GetCurrentDirectory() with a larger buffer if necessary, but doesn't check whether the new buffer is large enough. Another thread could change the current directory in meanwhile, so the buffer could turn out to be