cpython: c0900fd6e4b3 (original) (raw)

Mercurial > cpython

changeset 75944:c0900fd6e4b3 3.2

Issue #3367: NULL-terminate argv[] copies to prevent an invalid access in sys_update_path(). [#3367]

Stefan Krah skrah@bytereef.org
date Mon, 26 Mar 2012 15:05:22 +0200
parents 66117d4bb586
children 1ab8fa2277d9 9c234943efc2
files Modules/python.c
diffstat 1 files changed, 4 insertions(+), 2 deletions(-)[+] [-] Modules/python.c 6

line wrap: on

line diff

--- a/Modules/python.c +++ b/Modules/python.c @@ -22,9 +22,9 @@ extern wchar_t* _Py_DecodeUTF8_surrogate int main(int argc, char **argv) {

+ setlocale(LC_ALL, oldloc); free(oldloc); res = Py_Main(argc, argv_copy);