]> granicus.if.org Git - python/commitdiff
Issue #12287: Fix a stack corruption in ossaudiodev module when the FD is
authorCharles-François Natali <neologix@free.fr>
Sun, 28 Aug 2011 16:10:27 +0000 (18:10 +0200)
committerCharles-François Natali <neologix@free.fr>
Sun, 28 Aug 2011 16:10:27 +0000 (18:10 +0200)
greater than FD_SETSIZE.

1  2 
Misc/NEWS
Modules/_ssl.c
Modules/ossaudiodev.c
Modules/selectmodule.c
Modules/socketmodule.c

diff --cc Misc/NEWS
index b852219d6513fcc25303844958e1277619a2dc9a,4d285a3d7b8addb0b23dec19ce838204bd7f5862..17332914de11fd99fe45d768e97a9fa5e8fb7eb3
+++ b/Misc/NEWS
@@@ -268,48 -88,6 +268,51 @@@ Core and Builtin
  Library
  -------
  
++- Issue #12287: Fix a stack corruption in ossaudiodev module when the FD is
++  greater than FD_SETSIZE.
++
 +- Issue #12839: Fix crash in zlib module due to version mismatch.
 +  Fix by Richard M. Tew.
 +
 +- Issue #9923: The mailcap module now correctly uses the platform path
 +  separator for the MAILCAP environment variable on non-POSIX platforms.
 +
 +- Issue #12835: Follow up to #6560 that unconditionally prevents use of the
 +  unencrypted sendmsg/recvmsg APIs on SSL wrapped sockets. Patch by David
 +  Watson.
 +
 +- Issue #12803: SSLContext.load_cert_chain() now accepts a password argument
 +  to be used if the private key is encrypted.  Patch by Adam Simpkins.
 +
 +- Issue #11657: Fix sending file descriptors over 255 over a multiprocessing
 +  Pipe.
 +
 +- Issue #12811: tabnanny.check() now promptly closes checked files. Patch by
 +  Anthony Briggs.
 +
 +- Issue #6560: The sendmsg/recvmsg API is now exposed by the socket module
 +  when provided by the underlying platform, supporting processing of
 +  ancillary data in pure Python code. Patch by David Watson and Heiko Wundram.
 +
 +- Issue #12326: On Linux, sys.platform doesn't contain the major version
 +  anymore. It is now always 'linux', instead of 'linux2' or 'linux3' depending
 +  on the Linux version used to build Python.
 +
 +- Issue #12213: Fix a buffering bug with interleaved reads and writes that
 +  could appear on BufferedRandom streams.
 +
 +- Issue #12778: Reduce memory consumption when JSON-encoding a large
 +  container of many small objects.
 +
 +- Issue #12650: Fix a race condition where a subprocess.Popen could leak
 +  resources (FD/zombie) when killed at the wrong time.
 +
 +- Issue #12744: Fix inefficient representation of integers between 2**31 and
 +  2**63 on systems with a 64-bit C "long".
 +
 +- Issue #12646: Add an 'eof' attribute to zlib.Decompress, to make it easier to
 +  detect truncated input streams.
 +
  - Issue #11513: Fix exception handling ``tarfile.TarFile.gzopen()`` when
    the file cannot be opened.
  
diff --cc Modules/_ssl.c
Simple merge
Simple merge
Simple merge
index 936a68dcd6edbf5ed67fdc5683dc865e2244eb80,d3e5c753155f503117858859575477817d43b08c..f56e9afd52d0f55fb51748e1b2429338997e1ed1
@@@ -474,21 -455,7 +474,18 @@@ static PyTypeObject sock_type
  #include <sys/poll.h>
  #endif
  
- #ifdef Py_SOCKET_FD_CAN_BE_GE_FD_SETSIZE
- /* Platform can select file descriptors beyond FD_SETSIZE */
- #define IS_SELECTABLE(s) 1
- #elif defined(HAVE_POLL)
 +/* Largest value to try to store in a socklen_t (used when handling
 +   ancillary data).  POSIX requires socklen_t to hold at least
 +   (2**31)-1 and recommends against storing larger values, but
 +   socklen_t was originally int in the BSD interface, so to be on the
 +   safe side we use the smaller of (2**31)-1 and INT_MAX. */
 +#if INT_MAX > 0x7fffffff
 +#define SOCKLEN_T_LIMIT 0x7fffffff
 +#else
 +#define SOCKLEN_T_LIMIT INT_MAX
 +#endif
 +
+ #ifdef HAVE_POLL
  /* Instead of select(), we'll use poll() since poll() works on any fd. */
  #define IS_SELECTABLE(s) 1
  /* Can we call select() with this socket without a buffer overrun? */