View | Details | Raw Unified | Return to bug 210325 | Differences between
and this patch

Collapse All | Expand All

(-)python27/Makefile (-1 / +1 lines)
Lines 2-8 Link Here
2
2
3
PORTNAME=	python27
3
PORTNAME=	python27
4
PORTVERSION=	${PYTHON_PORTVERSION}
4
PORTVERSION=	${PYTHON_PORTVERSION}
5
PORTREVISION=	2
5
PORTREVISION=	3
6
CATEGORIES=	lang python ipv6
6
CATEGORIES=	lang python ipv6
7
MASTER_SITES=	PYTHON/ftp/python/${PORTVERSION}
7
MASTER_SITES=	PYTHON/ftp/python/${PORTVERSION}
8
DISTNAME=	Python-${PORTVERSION}
8
DISTNAME=	Python-${PORTVERSION}
(-)python27/files/patch-Modules_zipimport.c (+14 lines)
Line 0 Link Here
1
--- Modules/zipimport.c.orig	2015-12-05 19:47:16 UTC
2
+++ Modules/zipimport.c
3
@@ -895,6 +895,11 @@ get_data(char *archive, PyObject *toc_en
4
         PyMarshal_ReadShortFromFile(fp);        /* local header size */
5
     file_offset += l;           /* Start of file data */
6
 
7
+    if (data_size > LONG_MAX - 1) {
8
+        fclose(fp);
9
+        PyErr_NoMemory();
10
+        return NULL;
11
+    }
12
     raw_data = PyString_FromStringAndSize((char *)NULL, compress == 0 ?
13
                                           data_size : data_size + 1);
14
     if (raw_data == NULL) {
(-)python34/Makefile (-1 / +1 lines)
Lines 3-9 Link Here
3
3
4
PORTNAME=	python34
4
PORTNAME=	python34
5
PORTVERSION=	${PYTHON_PORTVERSION}
5
PORTVERSION=	${PYTHON_PORTVERSION}
6
PORTREVISION=	2
6
PORTREVISION=	3
7
CATEGORIES=	lang python ipv6
7
CATEGORIES=	lang python ipv6
8
MASTER_SITES=	PYTHON/ftp/python/${PORTVERSION}
8
MASTER_SITES=	PYTHON/ftp/python/${PORTVERSION}
9
DISTNAME=	Python-${PORTVERSION}
9
DISTNAME=	Python-${PORTVERSION}
(-)python34/files/patch-Modules_zipimport.c (+14 lines)
Line 0 Link Here
1
--- Modules/zipimport.c.orig	2015-12-21 06:01:04 UTC
2
+++ Modules/zipimport.c
3
@@ -1111,6 +1111,11 @@ get_data(PyObject *archive, PyObject *to
4
     }
5
     file_offset += l;           /* Start of file data */
6
 
7
+    if (data_size > LONG_MAX - 1) {
8
+        fclose(fp);
9
+        PyErr_NoMemory();
10
+        return NULL;
11
+    }
12
     bytes_size = compress == 0 ? data_size : data_size + 1;
13
     if (bytes_size == 0)
14
         bytes_size++;
(-)python35/Makefile (-1 / +1 lines)
Lines 3-9 Link Here
3
3
4
PORTNAME=	python
4
PORTNAME=	python
5
DISTVERSION=	${PYTHON_PORTVERSION}
5
DISTVERSION=	${PYTHON_PORTVERSION}
6
PORTREVISION=	2
6
PORTREVISION=	3
7
CATEGORIES=	lang python ipv6
7
CATEGORIES=	lang python ipv6
8
MASTER_SITES=	PYTHON/ftp/python/${PYTHON_PORTVERSION}
8
MASTER_SITES=	PYTHON/ftp/python/${PYTHON_PORTVERSION}
9
PKGNAMESUFFIX=	${PYTHON_SUFFIX}
9
PKGNAMESUFFIX=	${PYTHON_SUFFIX}
(-)python35/files/patch-Modules_zipimport.c (+14 lines)
Line 0 Link Here
1
--- Modules/zipimport.c.orig	2015-12-07 01:39:10 UTC
2
+++ Modules/zipimport.c
3
@@ -1112,6 +1112,11 @@ get_data(PyObject *archive, PyObject *to
4
     }
5
     file_offset += l;           /* Start of file data */
6
 
7
+    if (data_size > LONG_MAX - 1) {
8
+        fclose(fp);
9
+        PyErr_NoMemory();
10
+        return NULL;
11
+    }
12
     bytes_size = compress == 0 ? data_size : data_size + 1;
13
     if (bytes_size == 0)
14
         bytes_size++;

Return to bug 210325