Commit graph

9145 commits

Author SHA1 Message Date
Benjamin Peterson
cd04db03de mmap: do all internal arithmetic with Py_ssize_t while being very careful about overflow 2016-10-05 21:45:48 -07:00
Serhiy Storchaka
cc164232aa Issue #28295: Fixed the documentation and added tests for PyUnicode_AsUCS4().
Original patch by Xiang Zhang.
2016-10-02 21:29:26 +03:00
Serhiy Storchaka
85c3f268f4 Issue #28322: Fixed possible crashes when unpickle itertools objects from
incorrect pickle data.  Based on patch by John Leitch.
2016-10-02 08:34:53 +03:00
Martin Panter
38317d3318 Issue #28275: Clean up to avoid use-after-free after bzip decompress failure 2016-10-01 02:45:17 +00:00
Serhiy Storchaka
5ae4f49f4a Issue #20947: Fixed a gcc warning with -Wstrict-overflow. 2016-09-27 22:03:51 +03:00
Serhiy Storchaka
c0b7037d4f Issue #28275: Fixed possible use adter free in LZMADecompressor.decompress().
Original patch by John Leitch.
2016-09-27 20:14:26 +03:00
Serhiy Storchaka
407ac47690 Issue #27897: Fixed possible crash in sqlite3.Connection.create_collation()
if pass invalid string-like object as a name.  Patch by Xiang Zhang.
2016-09-27 00:10:03 +03:00
Christian Heimes
3cb091e576 Increase buffer for readlink() in case OS will support longer names one day. 2016-09-23 20:24:28 +02:00
Christian Heimes
2f366cab48 Add an extra byte for null in case we ever get very long unicode names. 2016-09-23 20:20:27 +02:00
Berker Peksag
bf3c1c3235 Issue #28075: Fix test_access_denied in Python 3.5
I forgot there two variations of os.stat() in Python 3.5.
2016-09-18 13:56:29 +03:00
Berker Peksag
0b4dc4846b Issue #28075: Check for ERROR_ACCESS_DENIED in Windows implementation of os.stat()
Patch by Eryk Sun.
2016-09-17 15:49:59 +03:00
Martin Panter
6d57fe1c23 Issue #28139: Fix messed up indentation
Also update the classmethod and staticmethod doc strings and comments to
match the RST documentation.
2016-09-17 03:26:16 +00:00
Martin Panter
2dc77f0e19 Issue #28145: Spelling fixes 2016-09-16 00:46:05 +00:00
Serhiy Storchaka
e6265e92bf Issue #27599: Fixed buffer overrun in binascii.b2a_qp() and binascii.a2b_qp(). 2016-09-14 16:34:37 +03:00
Christian Heimes
7ce201322e Restrict name_length to NAME_MAXLEN in unicodedata_UCD_lookup() 2016-09-14 10:25:46 +02:00
Berker Peksag
4aa74c429c Issue #28131: Fix a regression in zipimport's compile_source()
zipimport should use the same optimization level as the interpreter.
2016-09-14 08:09:48 +03:00
Serhiy Storchaka
8ddcf3abf7 Issue #28019: itertools.count() no longer rounds non-integer step in range
between 1.0 and 2.0 to 1.
2016-09-10 09:49:24 +03:00
Steve Dower
8dcc48ee3b Issue #25758: Prevents zipimport from unnecessarily encoding a filename (patch by Eryk Sun) 2016-09-09 17:27:33 -07:00
Martin Panter
0be894b2f6 Issue #27895: Spelling fixes (Contributed by Ville Skyttä). 2016-09-07 12:03:06 +00:00
Martin Panter
be8da9c990 Issue #27570: Avoid zero-length memcpy() calls with null source pointers 2016-09-07 11:04:41 +00:00
Benjamin Peterson
4a757609d1 do not memcpy from NULL 2016-09-06 19:03:40 -07:00
Christian Heimes
1c03abd026 Issue #27691: Fix ssl module's parsing of GEN_RID subject alternative name fields in X.509 certs. 2016-09-06 23:25:35 +02:00
Benjamin Peterson
1bb0c0bd30 explicitly cast away constness to silence compiler warning 2016-09-05 18:26:19 -07:00
Benjamin Peterson
5130a4d5d7 Backed out changeset 8b6be1341770 2016-09-05 17:22:09 -07:00
Benjamin Peterson
6d999803a0 remove long double from ctypes value union
It is unused. It also forces a 16-byte alignment, which creates problems because
Python's allocator only uses 8-byte alignment.
2016-09-05 16:24:52 -07:00
Christian Heimes
281e5f8839 Issue #26470: Use short name rather than name for compression name to fix #27958. 2016-09-06 01:10:39 +02:00
Benjamin Peterson
768f3b4492 do not pretend to support passing a fd to access() 2016-09-05 15:29:33 -07:00
Christian Heimes
598894ff48 Issue #26470: Port ssl and hashlib module to OpenSSL 1.1.0. 2016-09-05 23:19:05 +02:00
Serhiy Storchaka
2891492d23 Issue #27881: Fixed possible bugs when setting sqlite3.Connection.isolation_level.
Based on patch by Xiang Zhang.
2016-09-01 22:18:03 +03:00
Serhiy Storchaka
ef113cd4cc Issue #27861: Fixed a crash in sqlite3.Connection.cursor() when a factory
creates not a cursor.  Patch by Xiang Zhang.
2016-08-29 14:29:55 +03:00
Martin Panter
c427b8d517 Issue #19884: Avoid spurious output on OS X with Gnu Readline
Also adjust the test condition, because enable-meta-key was only added in
6.1, not 6.0.
2016-08-27 03:23:11 +00:00
Berker Peksag
cc9afa9b51 Issue #10513: Fix a regression in Connection.commit()
Statements should not be reset after a commit.

Backported from 029050896b
2016-08-26 22:07:51 +03:00
Berker Peksag
6afe85827c Issue #21718: cursor.description is now available for queries using CTEs
According to PEP 249, cursor.description must be
available for any SELECT statements, such as those
that use CTEs.

Backported from f67fa9c898

Additional test cases added by me.
2016-08-21 19:38:47 +03:00
Nick Coghlan
8682f578c1 Issue #27782: Fix m_methods handling in multiphase init
Multi-phase extension module import now correctly allows the
``m_methods`` field to be used to add module level functions
to instances of non-module types returned from ``Py_create_mod``.

Patch by Xiang Zhang.
2016-08-21 17:41:56 +10:00
Benjamin Peterson
6423429325 merge 3.4 (#27783) 2016-08-16 23:37:33 -07:00
Benjamin Peterson
a12d92bec1 merge 3.3 (#27783) 2016-08-16 23:36:20 -07:00
Benjamin Peterson
1f0e7c9933 rearrange methodcaller_new so that the main error case does not cause uninitialized memory usage (closes #27783) 2016-08-16 23:35:35 -07:00
Benjamin Peterson
76aa1fb3b1 merge 3.4 (#27774) 2016-08-15 22:05:06 -07:00
Benjamin Peterson
10bc0f6edf merge 3.3 (#27774) 2016-08-15 22:03:44 -07:00
Benjamin Peterson
3a27b0857e do not decref value borrowed from list (closes #27774) 2016-08-15 22:01:41 -07:00
Benjamin Peterson
81b9ecd2a3 fix corner cases in the management of server_hostname (closes #27773) 2016-08-15 21:55:37 -07:00
Benjamin Peterson
b1c6bdc76a merge 3.4 2016-08-15 21:43:57 -07:00
Benjamin Peterson
432ea4ff37 fail when negative values are passed to instr() 2016-08-15 21:40:14 -07:00
Benjamin Peterson
91060f26f9 merge 3.4 (closes #27760) 2016-08-13 18:37:12 -07:00
Benjamin Peterson
5295532adb merge 3.3 (closes #27760) 2016-08-13 18:36:55 -07:00
Benjamin Peterson
4f976513ef fix possible integer overflow in binascii.b2a_qp (closes #27760)
Reported by Thomas E. Hybel
2016-08-13 18:33:33 -07:00
Benjamin Peterson
f17a8e9acd merge 3.4 2016-08-13 18:21:16 -07:00
Benjamin Peterson
40a77c3381 do not allow reading negative values with getstr() 2016-08-13 18:15:28 -07:00
Benjamin Peterson
9745ee0b44 merge 3.4 (closes #27758) 2016-08-13 17:21:54 -07:00
Benjamin Peterson
59b6abd38c merge 3.3 (#27758) 2016-08-13 17:21:22 -07:00