summaryrefslogtreecommitdiff
path: root/lang/python26/patches/patch-CVE-2012-0845
blob: dd6f32cd8f65bbec47dd96cd8ebf7a92a3c76781 (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 2012/02/15 12:21:40 drochner Exp $

see python bug #14001

--- Lib/SimpleXMLRPCServer.py.orig	2009-04-05 21:34:15.000000000 +0000
+++ Lib/SimpleXMLRPCServer.py
@@ -459,7 +459,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 = ''.join(L)