]> granicus.if.org Git - python/commitdiff
Issue #24848: Fixed bugs in UTF-7 decoding of misformed data:
authorSerhiy Storchaka <storchaka@gmail.com>
Fri, 2 Oct 2015 10:14:03 +0000 (13:14 +0300)
committerSerhiy Storchaka <storchaka@gmail.com>
Fri, 2 Oct 2015 10:14:03 +0000 (13:14 +0300)
1. Non-ASCII bytes were accepted after shift sequence.
2. A low surrogate could be emitted in case of error in high surrogate.
3. In some circumstances the '\xfd' character was produced instead of the
replacement character '\ufffd' (due to a bug in _PyUnicodeWriter).

1  2 
Lib/test/test_codecs.py
Misc/NEWS
Objects/unicodeobject.c

Simple merge
diff --cc Misc/NEWS
index a9b124c5b39ab74f3c73db8a9f74a86df1fb19a3,fcc9fe30ebd4d784fda95572908e0e7ee1a57172..b43073f288a1fa274d3f64cbf0de9d28b7183f6e
+++ b/Misc/NEWS
@@@ -10,10 -11,8 +10,12 @@@ Release date: XXXX-XX-X
  Core and Builtins
  -----------------
  
+ - Issue #24848: Fixed a number of bugs in UTF-7 decoding of misformed data.
 +- Issue #25267: The UTF-8 encoder is now up to 75 times as fast for error
 +  handlers: ``ignore``, ``replace``, ``surrogateescape``, ``surrogatepass``.
 +  Patch co-written with Serhiy Storchaka.
 +
  - Issue #25280: Import trace messages emitted in verbose (-v) mode are no
    longer formatted twice.
  
Simple merge