[issue14579] CVE-2012-2135: Vulnerability in the utf-16 decoder after error handling

Martin v. Löwis report at bugs.python.org
Thu Apr 26 20:46:14 CEST 2012


Martin v. Löwis <martin at v.loewis.de> added the comment:

> UTF-16 units are 16-bit words, not bytes, so '\uffffd' sounds correct to
> me. You resynchronize on the word boundary: the invalid word is skipped.

I agree. The only odd case is when the number of bytes is not even
(pun intended). In that case, anybody can guess which of the bytes is
extra. The most natural (IMO) assumption is that the data is truncated,
so it would be the last byte which is extra.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue14579>
_______________________________________


More information about the Python-bugs-list mailing list