summaryrefslogtreecommitdiffstats
path: root/Objects/unicodeobject.c
Commit message (Collapse)AuthorAgeFilesLines
* 00147-add-debug-malloc-stats.patchFedora Python maintainers2020-09-291-0/+6
| | | | | | | 00147 # Add a sys._debugmallocstats() function Based on patch 202 from RHEL 5's python.spec, with updates from rhbz#737198 Sent upstream as http://bugs.python.org/issue14785
* bpo-33817: Fix _PyString_Resize() and _PyUnicode_Resize() for empty strings. ↵Serhiy Storchaka2019-01-121-1/+18
| | | | (GH-11515)
* [2.7] bpo-35214: Fix OOB memory access in unicode escape parser (GH-10506) ↵Gregory P. Smith2018-11-141-1/+1
| | | | | | | | | | (GH-10538) Discovered using clang's MemorySanitizer. A msan build will fail by simply executing: ./python -c 'u"\N"' (cherry picked from commit 746b2d3) Co-authored-by: Gregory P. Smith <greg@krypto.org> [Google LLC]
* Fix compilation warnings on Windows (GH-8627)Victor Stinner2018-08-021-1/+1
| | | | | | | | | | | | | | | | | | | * Fix compilation warning in _ctypes module on Window (cherry picked from commit 20f11fe43c47b68c8b9dd6539d2d40b66c9957f9) * Fix compilation warnings on Windows 64-bit (cherry picked from commit 725e4212229bf68f87d4f66c1815d444ddfc7aa5) * Fix compiler warning in unicodeobject.c Explicitly case to Py_UNICODE to fix the warning: Objects\unicodeobject.c(4225): warning C4244: '=' : conversion from 'long' to 'Py_UNICODE', possible loss of data The downcast cannot overflow since we check that value <= 0x10ffff.
* [2.7] bpo-34234: Use _PyAnyInt_Check() and _PyAnyInt_CheckExact(). (GH-8479)Serhiy Storchaka2018-07-311-1/+1
|
* bpo-30074: Fix compile warnings of _PySlice_Unpack and convert missed (#1154)Serhiy Storchaka2017-04-151-1/+1
| | | | PySlice_GetIndicesEx in _ctypes.c.
* bpo-27867: Expand the PySlice_GetIndicesEx macro. (#1023) (#1046)Serhiy Storchaka2017-04-081-2/+3
| | | | (cherry picked from commit b879fe8)
* Issue #29145: Fix overflow checks in string, bytearray and unicode.Xiang Zhang2017-01-091-15/+10
| | | | Patch by jan matejek and Xiang Zhang.
* promote some shifts to unsigned, so as not to invoke undefined behaviorBenjamin Peterson2016-09-071-2/+2
|
* Issue #27473: Fixed possible integer overflow in str, unicode and bytearraySerhiy Storchaka2016-07-121-5/+11
| | | | concatenations and repetitions. Based on patch by Xiang Zhang.
* Issue #22463: Backport compiler warning fixes and workaroundsMartin Panter2016-06-211-1/+1
| | | | | | | | | | | | | | * Set but unused variable in Parser/pgen.c in non-debug builds. Patch by Christian Heimes. * Unused static function in Modules/readline.c. Patch by Georg Brandl. * main_window unused in Modules/tkappinit.c. Patch by Gregory P. Smith. * Dead assignment in Modules/_ctypes/cfield.c. Extracted from patch by Brett Cannon. * Expression result unused in PyObject_INIT macro expansions. Based on patches by Christian Heimes. * Load expat_config.h and therefore pyconfig.h before C stdlib headers are loaded. This silences pre-processor warnings including '_POSIX_C_SOURCE redefined'. Extracted from patch by Christian Heimes.
* Issue #26200: Added Py_SETREF and replaced Py_XSETREF with Py_SETREFSerhiy Storchaka2016-04-101-1/+1
| | | | in places where Py_DECREF was used.
* Issue #13410: Fixed a bug in PyUnicode_Format where it failed to properlySerhiy Storchaka2016-04-101-1/+4
| | | | | | ignore errors from a __int__() method. Patch based on the patch for issue #15516.
* Issue #22570: Renamed Py_SETREF to Py_XSETREF.Serhiy Storchaka2016-04-061-1/+1
|
* Issue #20440: Massive replacing unsafe attribute setting code with specialSerhiy Storchaka2015-12-241-2/+1
| | | | macro Py_SETREF.
* Issue #19543: Added Py3k warning for decoding unicode.Serhiy Storchaka2015-12-031-0/+3
|
* Issue #24848: Fixed yet one bug in UTF-7 decoder. Testing for BASE64 characterSerhiy Storchaka2015-10-101-1/+4
| | | | was locale depending.
* Issue #24848: Fixed bugs in UTF-7 decoding of misformed data:Serhiy Storchaka2015-10-021-7/+9
| | | | | 1. Non-ASCII bytes were accepted after shift sequence. 2. A low surrogate could be emitted in case of error in high surrogate.
* Issue #19543: Emit deprecation warning for known non-text encodings.Serhiy Storchaka2015-05-311-4/+4
| | | | | | | | | | Backported issues #19619: encode() and decode() methods and constructors of str, unicode and bytearray classes now emit deprecation warning for known non-text encodings when Python is ran with the -3 option. Backported issues #20404: io.TextIOWrapper (and hence io.open()) now uses the internal codec marking system added to emit deprecation warning for known non-text encodings at stream construction time when Python is ran with the -3 option.
* Issue #23055: Fixed read-past-the-end error in PyUnicode_FromFormatV.Serhiy Storchaka2015-01-301-0/+2
|
* Issue #23055: Fixed off-by-one error in PyUnicode_FromFormatV.Serhiy Storchaka2015-01-301-1/+2
|
* Issue #23055: Fixed a buffer overflow in PyUnicode_FromFormatV. AnalysisSerhiy Storchaka2015-01-271-12/+13
| | | | and fix by Guido Vranken.
* Issue #23181: More "codepoint" -> "code point".Serhiy Storchaka2015-01-181-4/+4
|
* cleanup overflowing handling in unicode_decode_call_errorhandler and ↵Benjamin Peterson2014-09-291-21/+48
| | | | unicode_encode_ucs1 (closes #22518)
* Issue #22023: Fix %S, %R and %V formats of PyUnicode_FromFormat().Victor Stinner2014-07-291-9/+9
|
* give non-iterable TypeError a message (closes #20507)Benjamin Peterson2014-02-151-1/+1
|
* Issue #20437: Fixed 43 potential bugs when deleting objects references.Serhiy Storchaka2014-02-091-4/+2
|
* Issue #19279: UTF-7 decoder no more produces illegal unicode strings.Serhiy Storchaka2013-10-191-0/+2
|
* Issue #15866: The xmlcharrefreplace error handler no more produces two XMLSerhiy Storchaka2013-08-061-21/+61
| | | | entities for a non-BMP character on narrow build.
* Issue #18184: PyUnicode_FromFormat() and PyUnicode_FromFormatV() now raiseSerhiy Storchaka2013-06-231-1/+18
| | | | OverflowError when an argument of %c format is out of range.
* allow any type with __getitem__ to be a mapping for the purposes of % (#15801)Benjamin Peterson2013-03-241-2/+2
|
* Issue #17043: The unicode-internal decoder no longer read past the end ofSerhiy Storchaka2013-02-071-27/+24
| | | | input buffer.
* Issue #16979: Fix error handling bugs in the unicode-escape-decode decoder.Serhiy Storchaka2013-01-291-51/+28
|
* Issue #10156: In the interpreter's initialization phase, unicode globalsSerhiy Storchaka2013-01-261-41/+38
| | | | are now initialized dynamically as needed.
* Issue #16335: Fix integer overflow in unicode-escape decoder.Serhiy Storchaka2013-01-211-1/+2
|
* Issue #15989: Fix several occurrences of integer overflowSerhiy Storchaka2013-01-191-2/+6
| | | | | | | when result of PyInt_AsLong() or PyLong_AsLong() narrowed to int without checks. This is a backport of changesets 13e2e44db99d and 525407d89277.
* Issue #14850: Now a chamap decoder treates U+FFFE as "undefined mapping"Serhiy Storchaka2013-01-151-21/+25
| | | | in any mapping, not only in an unicode string.
* Issue #11461: Fix the incremental UTF-16 decoder. Original patch bySerhiy Storchaka2013-01-081-1/+4
| | | | | Amaury Forgeot d'Arc. Added tests for partial decoding of non-BMP characters.
* Fix out of bound read in UTF-32 decoder on "narrow Unicode" builds.Serhiy Storchaka2013-01-081-1/+1
|
* Issue #15379: Fix passing of non-BMP characters as integers for the charmap ↵Antoine Pitrou2012-11-171-2/+26
| | | | | | decoder (already working as unicode strings). Patch by Serhiy Storchaka.
* initialize more global type objects (closes #16369)Benjamin Peterson2012-10-311-0/+6
|
* Issue #14700: Fix buggy overflow checks for large precision and width in ↵Mark Dickinson2012-10-281-2/+2
| | | | new-style and old-style formatting.
* Issue #14783: Backport changes from 3.2.Chris Jerdonek2012-10-081-3/+4
|
* use the stricter PyMapping_Check (closes #15801)Benjamin Peterson2012-08-281-1/+1
|
* Issue #14579: Fix error handling bug in the utf-16 decoder.Antoine Pitrou2012-07-201-1/+1
| | | | Patch by Serhiy Storchaka.
* Improve tooltips for splitlines() by showing that the default for keepends ↵Raymond Hettinger2012-06-021-1/+1
| | | | is False.
* merge 2.7 release branchBenjamin Peterson2012-04-091-0/+2
|\
| * fix build without Py_DEBUG and DNDEBUG (closes #14509)Benjamin Peterson2012-04-091-0/+2
| |
* | kill this terribly outdated commentBenjamin Peterson2012-03-261-4/+0
|/
* merge 2.6Benjamin Peterson2012-02-211-0/+1
|\