Serhiy Storchaka
3fd4ab356d
Issue #17043 : The unicode-internal decoder no longer read past the end of
input buffer.
13 years ago
Serhiy Storchaka
d679377be7
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
4f5f0e54e0
Issue #16335 : Fix integer overflow in unicode-escape decoder.
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
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
dec798eb46
Fix out of bound read in UTF-32 decoder on "narrow Unicode" builds.
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
e3ae321222
Issue #15379 : Fix passing of non-BMP characters as integers for the charmap decoder (already working as unicode strings).
Patch by Serhiy Storchaka.
13 years ago
Benjamin Peterson
c43112823b
initialize more global type objects ( closes #16369 )
13 years ago
Benjamin Peterson
6da3ed63d8
initialize more global type objects ( closes #16369 )
13 years ago
Mark Dickinson
fb90c0934c
Issue #14700 : Fix buggy overflow checks for large precision and width in new-style and old-style formatting.
13 years ago
Mark Dickinson
75d3600466
Issue #14700 : Fix buggy overflow checks for large precision and width in new-style and old-style formatting.
13 years ago
Chris Jerdonek
ad4b000179
Issue #14783 : Backport changes from 3.2.
13 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.
13 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.
13 years ago
Benjamin Peterson
28a6cfaefc
use the stricter PyMapping_Check ( closes #15801 )
14 years ago
Benjamin Peterson
23d49d3e7e
use the stricter PyMapping_Check ( closes #15801 )
14 years ago
Nick Coghlan
573b1fd779
Fix str docstring
14 years ago
Antoine Pitrou
715a63b783
Issue #14579 : Fix error handling bug in the utf-16 decoder.
Patch by Serhiy Storchaka.
14 years ago
Antoine Pitrou
b4bbee25b1
Issue #14579 : Fix CVE-2012-2135: vulnerability in the utf-16 decoder after error handling.
Patch by Serhiy Storchaka.
14 years ago
Raymond Hettinger
aad5b02e62
Improve tooltips for splitlines() by showing that the default for keepends is False.
14 years ago
Benjamin Peterson
f6622c8a3e
fix build without Py_DEBUG and DNDEBUG ( closes #14509 )
14 years ago
Benjamin Peterson
f51c384a0a
fix build without Py_DEBUG and DNDEBUG ( closes #14509 )
14 years ago
Benjamin Peterson
e8ecc73844
kill this terribly outdated comment
14 years ago
Benjamin Peterson
a8755c586e
kill this terribly outdated comment
14 years ago
Benjamin Peterson
69e9727657
ensure no one tries to hash things before the random seed is found
14 years ago
Benjamin Peterson
26da920001
ensure no one tries to hash things before the random seed is found
14 years ago
Barry Warsaw
1e13eb084f
- Issue #13703 : oCERT-2011-003: add -R command-line option and PYTHONHASHSEED
environment variable, to provide an opt-in way to protect against denial of
service attacks due to hash collisions within the dict and set types. Patch
by David Malcolm, based on work by Victor Stinner.
14 years ago
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.
14 years ago
Éric Araujo
a4c81b07f8
Fix typo
14 years ago
Victor Stinner
cbe01342bc
Issue #13913 : normalize utf-8 codec name in UTF-8 decoder
14 years ago
Antoine Pitrou
1334884ff2
Issue #13848 : open() and the FileIO constructor now check for NUL characters in the file name.
Patch by Hynek Schlawack.
14 years ago
Gregory P. Smith
63e6c3222f
Consolidate the occurrances of the prime used as the multiplier when hashing
to a single #define instead of having several copies in several files.
This excludes the Modules/ tree (datetime and expat both have a copy
for their own purposes with no need for it to be the same).
14 years ago
Benjamin Peterson
53aa1d7c57
fix possible if unlikely leak
14 years ago
Victor Stinner
975134e2a2
Issue #13093 : Fix error handling on PyUnicode_EncodeDecimal()
Add tests for PyUnicode_EncodeDecimal()
14 years ago
Antoine Pitrou
30402549de
Issue #13333 : The UTF-7 decoder now accepts lone surrogates
(the encoder already accepts them).
14 years ago
Ezio Melotti
15d6b65ead
#12266 : Fix str.capitalize() to correctly uppercase/lowercase titlecased and cased non-letter characters.
15 years ago
Victor Stinner
ab1d16b456
Issue #13093 : Fix error handling on PyUnicode_EncodeDecimal()
* Add tests for PyUnicode_EncodeDecimal() and PyUnicode_TransformDecimalToASCII()
* Remove the unused "e" variable in replace()
14 years ago
Antoine Pitrou
5418ee0b9a
Issue #13333 : The UTF-7 decoder now accepts lone surrogates
(the encoder already accepts them).
14 years ago
Victor Stinner
d88d9836c5
Fix PyUnicode_AsWideCharString() doc: size doesn't contain the null character
Fix also spelling of the null character.
15 years ago
Ezio Melotti
93e7afc5d9
#9200 : The str.is* methods now work with strings that contain non-BMP characters even in narrow Unicode builds.
15 years ago
Benjamin Peterson
7a6b44ab62
the named of the character is actually NUL
15 years ago
Benjamin Peterson
5ad517a7d9
NUL -> NULL
15 years ago
Ezio Melotti
ee8d998ecf
#12266 : Fix str.capitalize() to correctly uppercase/lowercase titlecased and cased non-letter characters.
15 years ago
Benjamin Peterson
f413b80806
in narrow builds, make sure to test codepoints as identifier characters ( closes #12732 )
This fixes the use of Unicode identifiers outside the BMP in narrow builds.
15 years ago
Senthil Kumaran
53516a82df
Fix closes Issue12621 - Fix docstrings of find and rfind methods of bytes/bytearry/unicodeobject.
15 years ago