mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
Issue #14001: CVE-2012-0845: xmlrpc: Fix an endless loop in SimpleXMLRPCServer
upon malformed POST request.
This commit is contained in:
commit
3ccc918b4a
3 changed files with 15 additions and 7 deletions
|
@ -476,7 +476,10 @@ class SimpleXMLRPCRequestHandler(BaseHTTPRequestHandler):
|
|||
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)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue