pkgsrc/lang/python26/patches/patch-bb
tron a99c0c697c Add fix for CVE-2010-3492 and update the fix for CVE-2010-3493. Both
fixes taken from the Python 2.7 branch in the Python SVN repository.
2010-11-23 08:24:04 +00:00

28 lines
868 B
Text

$NetBSD: patch-bb,v 1.1 2010/11/23 08:24:04 tron Exp $
Fix for CVE-2010-3492, taken from the Python SVN repository:
http://svn.python.org/view?view=rev&revision=86084
--- Lib/asyncore.py.orig 2010-08-13 02:30:39.000000000 +0100
+++ Lib/asyncore.py 2010-11-22 18:13:52.000000000 +0000
@@ -348,12 +348,15 @@
# XXX can return either an address pair or None
try:
conn, addr = self.socket.accept()
- return conn, addr
- except socket.error, why:
- if why.args[0] == EWOULDBLOCK:
- pass
+ except TypeError:
+ return None
+ except socket.error as why:
+ if why.args[0] in (EWOULDBLOCK, ECONNABORTED):
+ return None
else:
raise
+ else:
+ return conn, addr
def send(self, data):
try: