summaryrefslogtreecommitdiff
path: root/lang/python31/patches/patch-CVE-2012-0845
blob: b4d5bf52203f48ff661637bc6eb07e10b52cd215 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
$NetBSD: patch-CVE-2012-0845,v 1.1.2.2 2012/02/18 23:35:28 tron Exp $

see python bug #14001

--- Lib/xmlrpc/server.py.orig	2011-06-11 15:48:51.000000000 +0000
+++ Lib/xmlrpc/server.py
@@ -449,7 +449,10 @@ class SimpleXMLRPCRequestHandler(BaseHTT
             L = []
             while size_remaining:
                 chunk_size = min(size_remaining, max_chunk_size)
-                L.append(self.rfile.read(chunk_size))
+                chunk = self.rfile.read(chunk_size)
+                if not chunk:
+                    break
+                L.append(chunk)
                 size_remaining -= len(L[-1])
             data = b''.join(L)