summaryrefslogtreecommitdiff
path: root/Objects/unicodeobject.c
AgeCommit message (Collapse)AuthorLines
2016-11-12Issue #28648: Fixed crash in Py_DecodeLocale() in debug build on Mac OS XSerhiy Storchaka-1/+1
when decode astral characters.
2015-12-03Issue #25709: Fixed problem with in-place string concatenation and utf-8 cache.Serhiy Storchaka-0/+5
2015-03-02use PyMem_NEW to detect overflow (closes #23362)Benjamin Peterson-1/+1
2015-01-27Issue #23055: Fixed a buffer overflow in PyUnicode_FromFormatV. AnalysisSerhiy Storchaka-0/+2
and fix by Guido Vranken.
2014-10-15Fixed signed/unsigned comparison warningAntoine Pitrou-1/+1
2014-10-15it suffices to check for PY_SSIZE_T_MAX overflow (#22643)Benjamin Peterson-3/+2
2014-10-15make sure length is unsignedBenjamin Peterson-1/+1
2014-10-15fix integer overflow in unicode case operations (closes #22643)Benjamin Peterson-0/+5
2014-09-29prevent overflow in unicode_repr (closes #22520)Benjamin Peterson-11/+17
2014-09-29cleanup overflowing handling in unicode_decode_call_errorhandler and ↵Benjamin Peterson-18/+56
unicode_encode_ucs1 (closes #22518)
2014-03-05Make the various iterators' "setstate" sliently and consistently clip theKristján Valur Jónsson-3/+7
index. This avoids the possibility of setting an iterator to an invalid state.
2014-02-24Issue #19619: Blacklist non-text codecs in method APISerhiy Storchaka-2/+2
str.encode, bytes.decode and bytearray.decode now use an internal API to throw LookupError for known non-text encodings, rather than attempting the encoding or decoding operation and then throwing a TypeError for an unexpected output type. The latter mechanism remains in place for third party non-text encodings. Backported changeset d68df99d7a57.
2014-02-15give non-iterable TypeError a message (closes #20507)Benjamin Peterson-1/+1
2014-02-09Issue #20437: Fixed 21 potential bugs when deleting objects references.Serhiy Storchaka-8/+4
2014-02-08Issue #20538: UTF-7 incremental decoder produced inconsistant string whenSerhiy Storchaka-1/+9
input was truncated in BASE64 section.
2013-10-19Issue #19279: UTF-7 decoder no more produces illegal strings.Serhiy Storchaka-0/+2
2013-08-04Silence compiler warning about an uninitialized variableRaymond Hettinger-1/+1
2013-07-20Check return value of PyType_Ready(&EncodingMapType)Christian Heimes-1/+2
CID 486654
2013-06-23Issue #18184: PyUnicode_FromFormat() and PyUnicode_FromFormatV() now raiseSerhiy Storchaka-2/+7
OverflowError when an argument of %c format is out of range.
2013-06-10remove MAX_MAXCHAR because it's unsafe for computing maximum codepoitn value ↵Benjamin Peterson-31/+26
(see #18183)
2013-05-11Issue #17237: Fix crash in the ASCII decoder on m68k.Antoine Pitrou-0/+9
2013-03-23Issue 17447: Clarify that str.isidentifier doesn't check for reserved keywords.Raymond Hettinger-1/+4
2013-03-06_PyUnicode_Writer() now also reuses Unicode singletons:Victor Stinner-1/+1
empty string and latin1 single character
2013-02-26Issue #17223: Fix PyUnicode_FromUnicode() for string of 1 character outsideVictor Stinner-7/+7
the range U+0000-U+10ffff.
2013-02-07Issue #17137: When an Unicode string is resized, the internal wide characterVictor Stinner-0/+4
string (wstr) format is now cleared.
2013-02-07Issue #17043: The unicode-internal decoder no longer read past the end ofSerhiy Storchaka-26/+22
input buffer.
2013-02-07Issue #17043: The unicode-internal decoder no longer read past the end ofSerhiy Storchaka-27/+24
input buffer.
2013-01-29Issue #16971: Fix a refleak in the charmap decoder.Serhiy Storchaka-4/+13
2013-01-29Issue #16979: Fix error handling bugs in the unicode-escape-decode decoder.Serhiy Storchaka-52/+30
2013-01-29Issue #16979: Fix error handling bugs in the unicode-escape-decode decoder.Serhiy Storchaka-51/+28
2013-01-26Issue #10156: In the interpreter's initialization phase, unicode globalsSerhiy Storchaka-90/+73
are now initialized dynamically as needed.
2013-01-26Issue #10156: In the interpreter's initialization phase, unicode globalsSerhiy Storchaka-52/+45
are now initialized dynamically as needed.
2013-01-25Issue #16980: Fix processing of escaped non-ascii bytes in theSerhiy Storchaka-1/+1
unicode-escape-decode decoder.
2013-01-21Issue #16335: Fix integer overflow in unicode-escape decoder.Serhiy Storchaka-1/+2
2013-01-21Issue #16335: Fix integer overflow in unicode-escape decoder.Serhiy Storchaka-1/+2
2013-01-19Issue #15989: Fix several occurrences of integer overflowSerhiy Storchaka-2/+2
when result of PyLong_AsLong() narrowed to int without checks. This is a backport of changesets 13e2e44db99d and 525407d89277.
2013-01-19Issue #15989: Fix several occurrences of integer overflowSerhiy Storchaka-2/+2
when result of PyLong_AsLong() narrowed to int without checks. This is a backport of changesets 13e2e44db99d and 525407d89277.
2013-01-15Issue #14850: Now a chamap decoder treates U+FFFE as "undefined mapping"Serhiy Storchaka-19/+22
in any mapping, not only in an unicode string.
2013-01-15Issue #14850: Now a chamap decoder treates U+FFFE as "undefined mapping"Serhiy Storchaka-21/+25
in any mapping, not only in an unicode string.
2013-01-09correct static string clearing loop (closes #16906)Benjamin Peterson-5/+8
2013-01-08Issue #11461: Fix the incremental UTF-16 decoder. Original patch bySerhiy Storchaka-1/+4
Amaury Forgeot d'Arc. Added tests for partial decoding of non-BMP characters.
2013-01-08Issue #11461: Fix the incremental UTF-16 decoder. Original patch bySerhiy Storchaka-1/+4
Amaury Forgeot d'Arc. Added tests for partial decoding of non-BMP characters.
2013-01-08Fix out of bound read in UTF-32 decoder on "narrow Unicode" builds.Serhiy Storchaka-1/+1
2013-01-04Issue #16856: Fix a segmentation fault from calling repr() on a dict withSerhiy Storchaka-1/+1
a key whose repr raise an exception.
2013-01-03(Merge 3.2) Issue #16455: On FreeBSD and Solaris, if the locale is C, theVictor Stinner-4/+4
ASCII/surrogateescape codec is now used, instead of the locale encoding, to decode the command line arguments. This change fixes inconsistencies with os.fsencode() and os.fsdecode() because these operating systems announces an ASCII locale encoding, whereas the ISO-8859-1 encoding is used in practice.
2013-01-03Issue #16455: On FreeBSD and Solaris, if the locale is C, theVictor Stinner-4/+4
ASCII/surrogateescape codec is now used, instead of the locale encoding, to decode the command line arguments. This change fixes inconsistencies with os.fsencode() and os.fsdecode() because these operating systems announces an ASCII locale encoding, whereas the ISO-8859-1 encoding is used in practice.
2012-12-10Fix the internals of our hash functions to used unsigned values during hashGregory P. Smith-1/+1
computation as the overflow behavior of signed integers is undefined. NOTE: This change is smaller compared to 3.2 as much of this cleanup had already been done. I added the comment that my change in 3.2 added so that the code would match up. Otherwise this just adds or synchronizes appropriate UL designations on some constants to be pedantic. In practice we require compiling everything with -fwrapv which forces overflow to be defined as twos compliment but this keeps the code cleaner for checkers or in the case where someone has compiled it without -fwrapv or their compiler's equivalent. Found by Clang trunk's Undefined Behavior Sanitizer (UBSan). Cleanup only - no functionality or hash values change.
2012-12-10Fix the internals of our hash functions to used unsigned values during hashGregory P. Smith-1/+1
computation as the overflow behavior of signed integers is undefined. In practice we require compiling everything with -fwrapv which forces overflow to be defined as twos compliment but this keeps the code cleaner for checkers or in the case where someone has compiled it without -fwrapv or their compiler's equivalent. Found by Clang trunk's Undefined Behavior Sanitizer (UBSan). Cleanup only - no functionality or hash values change.
2012-12-03(Merge 3.2) Issue #16416: On Mac OS X, operating system data are now alwaysVictor Stinner-4/+5
encoded/decoded to/from UTF-8/surrogateescape, instead of the locale encoding (which may be ASCII if no locale environment variable is set), to avoid inconsistencies with os.fsencode() and os.fsdecode() functions which are already using UTF-8/surrogateescape.
2012-12-03Issue #16416: On Mac OS X, operating system data are now alwaysVictor Stinner-4/+5
encoded/decoded to/from UTF-8/surrogateescape, instead of the locale encoding (which may be ASCII if no locale environment variable is set), to avoid inconsistencies with os.fsencode() and os.fsdecode() functions which are already using UTF-8/surrogateescape.