File: CVE-2012-0845.diff

package info (click to toggle)
python2.6 2.6.6-8%2Bdeb6u3
  • links: PTS, VCS
  • area: main
  • in suites: squeeze-lts
  • size: 65,368 kB
  • ctags: 106,965
  • sloc: ansic: 389,033; python: 375,783; asm: 9,734; sh: 4,934; makefile: 4,120; lisp: 2,933; objc: 775; xml: 62
file content (18 lines) | stat: -rw-r--r-- 838 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
Origin: http://hg.python.org/cpython/raw-rev/24244a744d01
Description: xmlrpc: Fix an endless loop in SimpleXMLRPCServer
 upon malformed POST request.
diff -Naur python2.6-2.6.7/Lib/SimpleXMLRPCServer.py python2.6-2.6.7.new/Lib/SimpleXMLRPCServer.py
--- python2.6-2.6.7/Lib/SimpleXMLRPCServer.py	2009-04-05 16:34:15.000000000 -0500
+++ python2.6-2.6.7.new/Lib/SimpleXMLRPCServer.py	2012-09-27 16:16:06.000000000 -0500
@@ -459,7 +459,10 @@
             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)