Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
22ef9f72
Commit
22ef9f72
authored
Feb 09, 2015
by
Benjamin Peterson
Browse files
Options
Browse Files
Download
Plain Diff
merge 3.3 (#23361)
parents
78daf00e
8ce68064
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
2 deletions
+13
-2
Misc/NEWS
Misc/NEWS
+1
-0
Modules/_winapi.c
Modules/_winapi.c
+12
-2
No files found.
Misc/NEWS
View file @
22ef9f72
...
...
@@ -13,6 +13,7 @@ Core and Builtins
Library
-------
- Issue #23361: Fix possible overflow in Windows subprocess creation code.
What'
s
New
in
Python
3.4.3
rc1
?
==============================
...
...
Modules/_winapi.c
View file @
22ef9f72
...
...
@@ -535,13 +535,23 @@ getenvironment(PyObject* environment)
"environment can only contain strings"
);
goto
error
;
}
if
(
totalsize
>
PY_SSIZE_T_MAX
-
PyUnicode_GET_LENGTH
(
key
)
-
1
)
{
PyErr_SetString
(
PyExc_OverflowError
,
"environment too long"
);
goto
error
;
}
totalsize
+=
PyUnicode_GET_LENGTH
(
key
)
+
1
;
/* +1 for '=' */
if
(
totalsize
>
PY_SSIZE_T_MAX
-
PyUnicode_GET_LENGTH
(
value
)
-
1
)
{
PyErr_SetString
(
PyExc_OverflowError
,
"environment too long"
);
goto
error
;
}
totalsize
+=
PyUnicode_GET_LENGTH
(
value
)
+
1
;
/* +1 for '\0' */
}
buffer
=
PyMem_Malloc
(
totalsize
*
sizeof
(
Py_UCS4
));
if
(
!
buffer
)
buffer
=
PyMem_NEW
(
Py_UCS4
,
totalsize
);
if
(
!
buffer
)
{
PyErr_NoMemory
();
goto
error
;
}
p
=
buffer
;
end
=
buffer
+
totalsize
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment