Serhiy Storchaka
35804e4c63
Issue #19279 : UTF-7 decoder no more produces illegal strings.
13 years ago
Raymond Hettinger
e56666d17f
Silence compiler warning about an uninitialized variable
13 years ago
Christian Heimes
26532f7519
Check return value of PyType_Ready(&EncodingMapType)
CID 486654
13 years ago
Serhiy Storchaka
8eeae2126c
Issue #18184 : PyUnicode_FromFormat() and PyUnicode_FromFormatV() now raise
OverflowError when an argument of %c format is out of range.
13 years ago
Benjamin Peterson
7e30373126
remove MAX_MAXCHAR because it's unsafe for computing maximum codepoitn value (see #18183 )
13 years ago
Antoine Pitrou
8b0e98426d
Issue #17237 : Fix crash in the ASCII decoder on m68k.
13 years ago
Benjamin Peterson
da2c7ebd23
allow any type with __getitem__ to be a mapping for the purposes of % ( #15801 )
13 years ago
Raymond Hettinger
378170d5d9
Issue 17447: Clarify that str.isidentifier doesn't check for reserved keywords.
13 years ago
Victor Stinner
2cb16aa3cb
_PyUnicode_Writer() now also reuses Unicode singletons:
empty string and latin1 single character
13 years ago
Victor Stinner
d21b58c05d
Issue #17223 : Fix PyUnicode_FromUnicode() for string of 1 character outside
the range U+0000-U+10ffff.
13 years ago
Victor Stinner
bbbac2ec34
Issue #17137 : When an Unicode string is resized, the internal wide character
string (wstr) format is now cleared.
13 years ago
Serhiy Storchaka
3fd4ab356d
Issue #17043 : The unicode-internal decoder no longer read past the end of
input buffer.
13 years ago
Serhiy Storchaka
d5327d95d2
Issue #17043 : The unicode-internal decoder no longer read past the end of
input buffer.
13 years ago
Serhiy Storchaka
afb1cb5579
Issue #16971 : Fix a refleak in the charmap decoder.
13 years ago
Serhiy Storchaka
d679377be7
Issue #16979 : Fix error handling bugs in the unicode-escape-decode decoder.
13 years ago
Serhiy Storchaka
c8e58126a2
Issue #16979 : Fix error handling bugs in the unicode-escape-decode decoder.
13 years ago
Serhiy Storchaka
059972535f
Issue #10156 : In the interpreter's initialization phase, unicode globals
are now initialized dynamically as needed.
13 years ago
Serhiy Storchaka
c59c85c1ac
Issue #10156 : In the interpreter's initialization phase, unicode globals
are now initialized dynamically as needed.
13 years ago
Serhiy Storchaka
73e38809e0
Issue #16980 : Fix processing of escaped non-ascii bytes in the
unicode-escape-decode decoder.
13 years ago
Serhiy Storchaka
1d3acd4b59
Issue #16335 : Fix integer overflow in unicode-escape decoder.
13 years ago
Serhiy Storchaka
4f5f0e54e0
Issue #16335 : Fix integer overflow in unicode-escape decoder.
13 years ago
Serhiy Storchaka
74f49ab28b
Issue #15989 : Fix several occurrences of integer overflow
when result of PyInt_AsLong() or PyLong_AsLong() narrowed
to int without checks.
This is a backport of changesets 13e2e44db99d and 525407d89277.
13 years ago
Serhiy Storchaka
441d30fac7
Issue #15989 : Fix several occurrences of integer overflow
when result of PyLong_AsLong() narrowed to int without checks.
This is a backport of changesets 13e2e44db99d and 525407d89277.
13 years ago
Serhiy Storchaka
4fb8caee87
Issue #14850 : Now a chamap decoder treates U+FFFE as "undefined mapping"
in any mapping, not only in an unicode string.
13 years ago
Serhiy Storchaka
9599745e2c
Issue #14850 : Now a chamap decoder treates U+FFFE as "undefined mapping"
in any mapping, not only in an unicode string.
13 years ago
Benjamin Peterson
0c270a8bb7
correct static string clearing loop ( closes #16906 )
13 years ago
Serhiy Storchaka
48e188e573
Issue #11461 : Fix the incremental UTF-16 decoder. Original patch by
Amaury Forgeot d'Arc. Added tests for partial decoding of non-BMP
characters.
13 years ago
Serhiy Storchaka
c4b82c037e
Issue #11461 : Fix the incremental UTF-16 decoder. Original patch by
Amaury Forgeot d'Arc. Added tests for partial decoding of non-BMP
characters.
13 years ago
Serhiy Storchaka
dec798eb46
Fix out of bound read in UTF-32 decoder on "narrow Unicode" builds.
13 years ago
Serhiy Storchaka
c9631a14d7
Fix out of bound read in UTF-32 decoder on "narrow Unicode" builds.
13 years ago
Serhiy Storchaka
6c83e739d7
Issue #16856 : Fix a segmentation fault from calling repr() on a dict with
a key whose repr raise an exception.
13 years ago
Victor Stinner
20b654acb5
Issue #16455 : On FreeBSD and Solaris, if the locale is C, the
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.
13 years ago
Gregory P. Smith
27cbcd6241
Fix the internals of our hash functions to used unsigned values during hash
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.
13 years ago
Victor Stinner
27b1ca29cc
Issue #16416 : On Mac OS X, operating system data are now always
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.
13 years ago
Antoine Pitrou
6d5ad227a5
Issue #16215 : Fix potential double memory free in str.replace().
Patch by Serhiy Storchaka.
14 years ago
Antoine Pitrou
e3ae321222
Issue #15379 : Fix passing of non-BMP characters as integers for the charmap decoder (already working as unicode strings).
Patch by Serhiy Storchaka.
14 years ago
Ezio Melotti
f7ed5d111b
#8271 : the utf-8 decoder now outputs the correct number of U+FFFD characters when used with the "replace" error handler on invalid utf-8 sequences. Patch by Serhiy Storchaka, tests by Ezio Melotti.
14 years ago
Benjamin Peterson
c43112823b
initialize more global type objects ( closes #16369 )
14 years ago
Benjamin Peterson
6da3ed63d8
initialize more global type objects ( closes #16369 )
14 years ago
Mark Dickinson
fb90c0934c
Issue #14700 : Fix buggy overflow checks for large precision and width in new-style and old-style formatting.
14 years ago
Mark Dickinson
75d3600466
Issue #14700 : Fix buggy overflow checks for large precision and width in new-style and old-style formatting.
14 years ago
Chris Jerdonek
ad4b000179
Issue #14783 : Backport changes from 3.2.
14 years ago
Chris Jerdonek
83fe2e1c22
Issue #14783 : Improve int() docstring and also str(), range(), and slice().
This commit rewrites the docstring for int() to incorporate the documentation
changes made in issue #16036 . It also switches the docstrings for int(),
str(), range(), and slice() to use multi-line signatures.
14 years ago
Mark Dickinson
c04ddff290
Issue #16096 : Fix several occurrences of potential signed integer overflow. Thanks Serhiy Storchaka.
14 years ago
Ezio Melotti
e7f90375b1
#16127 : remove outdated references to narrow builds. Patch by Serhiy Storchaka.
14 years ago
Victor Stinner
1929407406
Fix PyUnicode_Format(): return NULL if PyUnicode_READY(uformat) failed
This error cannot occur in practice: PyUnicode_FromObject() always return
a "ready" string.
14 years ago
Antoine Pitrou
6f80f5d444
Issue #15379 : Fix passing of non-BMP characters as integers for the charmap decoder (already working as unicode strings).
Patch by Serhiy Storchaka.
14 years ago
Antoine Pitrou
ca8aa4acf6
Issue #15144 : Fix possible integer overflow when handling pointers as integer values, by using Py_uintptr_t instead of size_t.
Patch by Serhiy Storchaka.
14 years ago
Christian Heimes
5f520f4fed
Issue #15900 : Fixed reference leak in PyUnicode_TranslateCharmap()
14 years ago
Christian Heimes
fd30236494
Fixed memory leak in error branch of formatfloat(). CID 719687
14 years ago