Commit Graph

5070 Commits

Author SHA1 Message Date
Kristjan Valur Jonsson 9946bd69fa Don't DECREF the ctypes error_object without the GIL held. 2012-12-21 09:41:25 +00:00
Gregory P. Smith 8e91cf6a5e Fixes issue #14234: CVE-2012-0876: Randomize hashes of xml attributes
in the hash table internal to the pyexpat module's copy of the expat
library to avoid a denial of service due to hash collisions.
Patch by David Malcolm with some modifications by the expat project.
2012-03-14 14:26:55 -07:00
Georg Brandl c9a42070a6 Remove reST markup from --help output. Also: O(n**2) is dict construction, not single insertion. 2012-02-21 22:36:27 +01:00
Benjamin Peterson 69e9727657 ensure no one tries to hash things before the random seed is found 2012-02-21 11:08:50 -05:00
Georg Brandl 2daf6ae249 Issue #13703: add a way to randomize the hash values of basic types (str, bytes, datetime)
in order to make algorithmic complexity attacks on (e.g.) web apps much more complicated.

The environment variable PYTHONHASHSEED and the new command line flag -R control this
behavior.
2012-02-20 19:54:16 +01:00
Antoine Pitrou f2bf8a6ac5 Issue #13885: CVE-2011-3389: the _ssl module would always disable the CBC IV attack countermeasure. 2012-01-27 09:48:47 +01:00
Benjamin Peterson 52e61449e3 return NULL on error 2011-05-31 21:38:15 -05:00
Benjamin Peterson a22c98de85 simply use the Python version for pyexpat.__version__ #12221 2011-05-31 18:59:49 -05:00
Victor Stinner a80987f20d Issue #12175: RawIOBase.readall() now returns None if read() returns None. 2011-05-25 22:47:16 +02:00
Victor Stinner b79f28ccbd Issue #12175: FileIO.readall() now raises a ValueError instead of an IOError if
the file is closed.
2011-05-25 22:09:03 +02:00
Victor Stinner 6bcbef7da0 Issue #12100: Don't reset incremental encoders of CJK codecs at each call to
their encode() method anymore, but continue to call the reset() method if the
final argument is True.
2011-05-24 22:17:55 +02:00
Victor Stinner 4925cde1cc Issue #12124: zipimport doesn't keep a reference to zlib.decompress() anymore
to be able to unload the module.
2011-05-20 00:16:09 +02:00
Victor Stinner d0e11ec5b0 Issue #10756: atexit normalizes the exception before displaying it. Patch by
Andreas Stührk.

Backport a fix already applied to Python 3.2+ (4a82be47a948 + 5060a92a8597).
2011-05-15 18:57:44 +02:00
Victor Stinner 2ec6b176bd Issue #12060: Use sig_atomic_t type and volatile keyword in the signal module.
Patch written by Charles-François Natali.
2011-05-15 10:21:59 +02:00
Nadeem Vawda 0c3d96ae1d Issue #8650: Make zlib.[de]compressobj().[de]compress() 64-bit clean.
Raise an OverflowError if the input data is too large, instead of silently
truncating the input and returning an incorrect result.
2011-05-15 00:19:50 +02:00
Nadeem Vawda 1b8a417d9f Issue #8650: Backport 64-bit safety fixes for compress() and decompress(). 2011-05-14 22:26:55 +02:00
Nadeem Vawda 7619e88adb Issue #12050: zlib.decompressobj().decompress() now clears the unconsumed_tail
attribute when called without a max_length argument.
2011-05-14 14:05:20 +02:00
Antoine Pitrou 7c40489180 Issue #12062: Fix a flushing bug when doing a certain type of I/O sequence
on a file opened in read+write mode (namely: reading, seeking a bit forward,
writing, then seeking before the previous write but still within buffered
data, and writing again).
2011-05-13 00:13:33 +02:00
Kurt B. Kaiser e147806da9 Issue #1028: Tk returns invalid Unicode null in %A: UnicodeDecodeError.
With Tk < 8.5 _tkinter.c:PythonCmd() raised UnicodeDecodeError, caused IDLE to
exit.  Converted to valid Unicode null in PythonCmd().
2011-05-11 12:24:17 -04:00
Ezio Melotti 136726537f #12051: Fix segfault in json.dumps() while encoding highly-nested objects using the C accelerations. 2011-05-11 01:02:56 +03:00
Victor Stinner ee18b6f2fd Issue #12012: ssl.PROTOCOL_SSLv2 becomes optional
OpenSSL is now compiled with OPENSSL_NO_SSL2 defined (without the SSLv2
protocol) on Debian: fix the ssl module on Debian Testing and Debian Sid.

Optimize also ssl.get_protocol_name(): speed does matter!
2011-05-10 00:38:00 +02:00
Ezio Melotti 362b95102f #12017: Fix segfault in json.loads() while decoding highly-nested objects using the C accelerations. 2011-05-07 17:58:09 +03:00
Victor Stinner a6cd0cf0f5 Issue #11277: mmap calls fcntl(fd, F_FULLFSYNC) on Mac OS X to get around a
mmap bug with sparse files. Patch written by Steffen Daode Nurpmeso.
2011-05-02 01:05:37 +02:00
Victor Stinner 6c9b35bfe2 Issue #11768: The signal handler of the signal module only calls
Py_AddPendingCall() for the first signal to fix a deadlock on reentrant or
parallel calls. PyErr_SetInterrupt() writes also into the wake up file.
2011-04-18 16:25:56 +02:00
Senthil Kumaran 8f377a3bbe Issue #10762: Guard against invalid/non-supported format string '%f' on Windows. Patch Santoso Wijaya. 2011-04-06 12:54:06 +08:00
Kristjan Valur Jonsson d05595697d Merge 3.1 2011-03-30 11:54:13 +00:00
Kristjan Valur Jonsson 35722a9376 Bugfix: Properly test for errors from PyLong_AsLong() in itertools.cycle.
ti can raise an exception even if PyLong_Check() has
succeeded.
2011-03-30 11:04:28 +00:00
Raymond Hettinger d6c1d57195 Issue 11713: clarify docstring for collections.deque() 2011-03-29 17:30:01 -07:00
Benjamin Peterson ad45bfe2d3 let's keep parenthesis around sizeof 2011-03-28 17:25:15 -05:00
Benjamin Peterson 39530f8cbe always check return value of PyObject_IsInstance for error 2011-03-26 18:04:09 -05:00
Benjamin Peterson 8d6c62dd89 check possible recursive _as_parameter_ to prevent segfault (closes #1838) 2011-03-26 17:56:28 -05:00
Antoine Pitrou 5e98141f9f Issue #5421: Fix misleading error message when one of socket.sendto()'s
arguments has the wrong type.  Patch by Nikita Vetoshkin.
2011-03-17 22:38:37 +01:00
Ezio Melotti 9465d424ec Revert typo fixes in zlib/* 2011-03-16 12:48:54 +02:00
Ezio Melotti 13925008dc #11565: Fix several typos. Patch by Piotr Kasprzyk. 2011-03-16 11:05:33 +02:00
Ezio Melotti 8beaa6c2ec Revert typo fixes in _cytpes/libffi* 2011-03-15 19:10:51 +02:00
Ezio Melotti 42da663e6f #11515: fix several typos. Patch by Piotr Kasprzyk. 2011-03-15 05:18:48 +02:00
Antoine Pitrou 7983d33f54 Issue #11450: Don't truncate hg version info in Py_GetBuildInfo() when
there are many tags (e.g. when using mq).  Patch by Nadeem Vawda.
2011-03-09 12:34:41 +01:00
Georg Brandl 1ca2e7965c Commit the hg build identification patch from the pymigr repo. 2011-03-05 20:51:24 +01:00
Antoine Pitrou 16a0a0b0a0 Issue #11391: Writing to a mmap object created with
`mmap.PROT_READ|mmap.PROT_EXEC` would segfault instead of raising a
TypeError.  Patch by Charles-François Natali.
2011-03-06 01:11:03 +01:00
Antoine Pitrou 9e719b6eba Merged revisions 88460,88464,88466,88486,88511,88652 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r88460 | antoine.pitrou | 2011-02-21 19:03:13 +0100 (lun., 21 févr. 2011) | 4 lines

  Issue #10276: Fix the results of zlib.crc32() and zlib.adler32() on buffers
  larger than 4GB.  Patch by Nadeem Vawda.
........
  r88464 | antoine.pitrou | 2011-02-21 20:05:08 +0100 (lun., 21 févr. 2011) | 3 lines

  Fix issues on 32-bit systems introduced by r88460
........
  r88466 | antoine.pitrou | 2011-02-21 20:28:40 +0100 (lun., 21 févr. 2011) | 3 lines

  Fix compile error under MSVC introduced by r88460.
........
  r88486 | antoine.pitrou | 2011-02-22 00:41:12 +0100 (mar., 22 févr. 2011) | 5 lines

  Issue #4681: Allow mmap() to work on file sizes and offsets larger than
  4GB, even on 32-bit builds.  Initial patch by Ross Lagerwall, adapted for
  32-bit Windows.
........
  r88511 | antoine.pitrou | 2011-02-22 22:42:56 +0100 (mar., 22 févr. 2011) | 4 lines

  Issue #11277: finally fix Snow Leopard crash following r88460.
  (probably an OS-related issue with mmap)
........
  r88652 | antoine.pitrou | 2011-02-26 16:58:05 +0100 (sam., 26 févr. 2011) | 4 lines

  Issue #9931: Fix hangs in GUI tests under Windows in certain conditions.
  Patch by Hirokazu Yamamoto.
........
2011-02-28 23:48:16 +00:00
Alexander Belopolsky 4fb96f41f4 Merged revisions 87919 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r87919 | alexander.belopolsky | 2011-01-10 20:21:25 -0500 (Mon, 10 Jan 2011) | 4 lines

  Issue #1726687: time.mktime() will now correctly compute value one
  second before epoch.  Original patch by Peter Wang, reported by Martin
  Blais.
........
2011-02-15 15:40:59 +00:00
R. David Murray 43b2f457a0 Merged revisions 87136,87221,87256,87337-87338,87571,87839,88164 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k


........
  r87136 | r.david.murray | 2010-12-08 17:53:00 -0500 (Wed, 08 Dec 2010) | 6 lines

  Have script_helper._assert_python strip refcount strings from stderr.

  This makes the output of the function and those that depend on it
  independent of whether or not they are being run under a debug
  build.
........
  r87221 | r.david.murray | 2010-12-13 19:55:46 -0500 (Mon, 13 Dec 2010) | 4 lines

  #10699: fix docstring for tzset: it does not take a parameter

  Thanks to Garrett Cooper for the fix.
........
  r87256 | r.david.murray | 2010-12-14 21:19:14 -0500 (Tue, 14 Dec 2010) | 2 lines

  #10705: document what the values of debuglevel are and mean.
........
  r87337 | r.david.murray | 2010-12-17 11:11:40 -0500 (Fri, 17 Dec 2010) | 2 lines

  #10559: provide instructions for accessing sys.argv when first mentioned.
........
  r87338 | r.david.murray | 2010-12-17 11:29:07 -0500 (Fri, 17 Dec 2010) | 2 lines

  #10454: clarify the compileall docs and help messages.
    [compileall.py changes not backported.]
........
  r87571 | r.david.murray | 2010-12-29 14:06:48 -0500 (Wed, 29 Dec 2010) | 2 lines

  Fix same typo in docs.
........
  r87839 | r.david.murray | 2011-01-07 16:57:25 -0500 (Fri, 07 Jan 2011) | 9 lines

  Fix formatting of values with embedded newlines when rfc2047 encoding

  Before this patch if a value being encoded had an embedded newline,
  the line following the newline would have no leading whitespace,
  and the whitespace it did have was encoded into the word.  Now
  the existing whitespace gets turned into a blank, the way it does
  in other header reformatting, and the _continuation_ws gets added
  at the beginning of the encoded line.
........
  r88164 | r.david.murray | 2011-01-24 14:34:58 -0500 (Mon, 24 Jan 2011) | 12 lines

  #10960: fix 'stat' links, link to lstat from stat, general tidy of stat doc.

  Original patch by Michal Nowikowski, with some additions and wording
  fixes by me.

  I changed the wording from 'Performs a stat system call' to 'Performs
  the equivalent of a stat system call', since on Windows there are no
  stat/lstat system calls involved.  I also extended Michal's breakout
  of the attributes into a list to the other paragraphs, and rearranged
  the order of the paragraphs in the 'stat' docs to make it flow
  better and put it in what I think is a more logical/useful order.
........
2011-02-11 03:13:19 +00:00
Brett Cannon f7ef4de3d5 Merged revisions 88337 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r88337 | brett.cannon | 2011-02-04 12:24:02 -0800 (Fri, 04 Feb 2011) | 5 lines

  There was a possibility that the initialization of _sqlite, when it failed,
  would lead to a decref of a NULL.

  Fixes issue #11110.
........
2011-02-04 20:30:30 +00:00
Antoine Pitrou 2e811c92c7 Merged revisions 88284 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r88284 | antoine.pitrou | 2011-01-31 22:08:57 +0100 (lun., 31 janv. 2011) | 4 lines

  Issue #8275: Fix passing of callback arguments with ctypes under Win64.
  Patch by Stan Mihai. Ok'ed by Georg.
........
2011-01-31 21:36:33 +00:00
Antoine Pitrou 0f2a61a11e Merged revisions 88147 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r88147 | antoine.pitrou | 2011-01-23 18:12:25 +0100 (dim., 23 janv. 2011) | 3 lines

  Issue #10987: Fix the recursion limit handling in the _pickle module.
........
2011-01-23 17:21:28 +00:00
Antoine Pitrou 6107a4e24a Merged revisions 88131 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r88131 | antoine.pitrou | 2011-01-20 22:07:24 +0100 (jeu., 20 janv. 2011) | 6 lines

  Issue #10955: Fix a potential crash when trying to mmap() a file past its
  length.  Initial patch by Ross Lagerwall.

  This fixes a regression introduced by r88022.
........
2011-01-20 21:11:13 +00:00
Antoine Pitrou 710e96651d Merged revisions 88111 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r88111 | antoine.pitrou | 2011-01-19 16:21:35 +0100 (mer., 19 janv. 2011) | 4 lines

  Issue #10898: Allow compiling the posix module when the C library defines
  a symbol named FSTAT.
........
2011-01-19 15:26:37 +00:00
Antoine Pitrou 50dc65f6ce Merged revisions 88036 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r88036 | antoine.pitrou | 2011-01-15 18:25:58 +0100 (sam., 15 janv. 2011) | 3 lines

  Fix mmap and test_mmap under Windows too (followup to r88022)
........
2011-01-15 17:31:19 +00:00
Antoine Pitrou fb7bc3d2f0 Merged revisions 88022 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r88022 | antoine.pitrou | 2011-01-15 17:17:07 +0100 (sam., 15 janv. 2011) | 7 lines

  Issue #10916: mmap should not segfault when a file is mapped using 0 as
  length and a non-zero offset, and an attempt to read past the end of file
  is made (IndexError is raised instead).  Patch by Ross Lagerwall.

  Requested by Georg.
........
2011-01-15 16:18:37 +00:00
Eli Bendersky 44a6c16729 Merged revisions 87991 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r87991 | eli.bendersky | 2011-01-14 09:31:14 +0200 (Fri, 14 Jan 2011) | 2 lines

  Remove call to nonexisting function (relic from Python 2.x) under #ifdef __INSURE__. Issue 9844
........
2011-01-14 08:52:17 +00:00