[New-bugs-announce] [issue28379] PyUnicode_CopyCharacters could lead to undefined behaviour

Xiang Zhang report at bugs.python.org
Thu Oct 6 14:15:04 EDT 2016


New submission from Xiang Zhang:

Currently PyUnicode_CopyCharacters doesn't check arguments thoroughly. This could lead to undefined behaviour or crash in debug mode. For example, from_start > len(from), how_many < 0. Another case is that when how_many > len(from), it will choose len(from) but this can still fail since from_start can > 0. The doc of it is also not perfect, it does not necessarily return 0 on success.

----------
components: Interpreter Core
files: PyUnicode_CopyCharacters.patch
keywords: patch
messages: 278202
nosy: haypo, serhiy.storchaka, xiang.zhang
priority: normal
severity: normal
stage: patch review
status: open
title: PyUnicode_CopyCharacters could lead to undefined behaviour
type: behavior
versions: Python 3.5, Python 3.6, Python 3.7
Added file: http://bugs.python.org/file44989/PyUnicode_CopyCharacters.patch

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


More information about the New-bugs-announce mailing list