Skip to content

Commit 30a581e

Browse files
Merge branch '3.4' into backport-a897aee-3.4
2 parents 65545b5 + 092db6c commit 30a581e

File tree

7 files changed

+16
-5
lines changed

7 files changed

+16
-5
lines changed

Misc/ACKS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,7 @@ Gregory Bond
155155
Matias Bordese
156156
Jonas Borgström
157157
Jurjen Bos
158+
Jay Bosamiya
158159
Peter Bosch
159160
Dan Boswell
160161
Eric Bouck
@@ -616,6 +617,7 @@ Alan Hourihane
616617
Ken Howard
617618
Brad Howes
618619
Mike Hoy
620+
Miro Hrončok
619621
Chiu-Hsiang Hsu
620622
Chih-Hao Huang
621623
Christian Hudon
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Update Windows build and OS X installers to use OpenSSL 1.0.2k.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Fixed possible integer overflow in PyBytes_DecodeEscape, CVE-2017-1000158.
2+
Original patch by Jay Bosamiya; rebased to Python 3 by Miro Hrončok.

Objects/bytesobject.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,13 @@ PyObject *PyBytes_DecodeEscape(const char *s,
368368
char *p, *buf;
369369
const char *end;
370370
PyObject *v;
371-
Py_ssize_t newlen = recode_encoding ? 4*len:len;
371+
Py_ssize_t newlen;
372+
/* Check for integer overflow */
373+
if (recode_encoding && (len > PY_SSIZE_T_MAX / 4)) {
374+
PyErr_SetString(PyExc_OverflowError, "string is too large");
375+
return NULL;
376+
}
377+
newlen = recode_encoding ? 4*len:len;
372378
v = PyBytes_FromStringAndSize((char *)NULL, newlen);
373379
if (v == NULL)
374380
return NULL;

PCbuild/get_externals.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ echo.Fetching external libraries...
5454
for %%e in (
5555
bzip2-1.0.6
5656
nasm-2.11.06
57-
openssl-1.0.2j
57+
openssl-1.0.2k
5858
tcl-8.6.1.0
5959
tk-8.6.1.0
6060
tix-8.4.3.4

PCbuild/pyproject.props

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<OutDir>$(SolutionDir)</OutDir>
66
<IntDir>$(SolutionDir)$(PlatformName)-temp-$(Configuration)\$(ProjectName)\</IntDir>
77
<LinkIncremental>false</LinkIncremental>
8-
</PropertyGroup>
8+
</PropertyGroup>
99
<PropertyGroup Condition="'$(Platform)'=='x64'">
1010
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
1111
<_PropertySheetDisplayName>amd64</_PropertySheetDisplayName>
@@ -20,7 +20,7 @@
2020
<sqlite3Dir>$(externalsDir)\sqlite-3.8.11.0</sqlite3Dir>
2121
<bz2Dir>$(externalsDir)\bzip2-1.0.6</bz2Dir>
2222
<lzmaDir>$(externalsDir)\xz-5.0.5</lzmaDir>
23-
<opensslDir>$(externalsDir)\openssl-1.0.2j</opensslDir>
23+
<opensslDir>$(externalsDir)\openssl-1.0.2k</opensslDir>
2424
<tcltkDir>$(externalsDir)\tcltk</tcltkDir>
2525
<tcltk64Dir>$(externalsDir)\tcltk64</tcltk64Dir>
2626
<tcltkLib>$(tcltkDir)\lib\tcl86t.lib;$(tcltkDir)\lib\tk86t.lib</tcltkLib>

PCbuild/readme.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ _lzma
171171
Homepage:
172172
http://tukaani.org/xz/
173173
_ssl
174-
Python wrapper for version 1.0.2j of the OpenSSL secure sockets
174+
Python wrapper for version 1.0.2k of the OpenSSL secure sockets
175175
library, which is built by ssl.vcxproj
176176
Homepage:
177177
http://www.openssl.org/

0 commit comments

Comments
 (0)