[issue28379] PyUnicode_CopyCharacters could lead to undefined behaviour

2017-03-31 Thread Donald Stufft
Changes by Donald Stufft : -- pull_requests: +1061 ___ Python tracker ___ ___

[issue28379] PyUnicode_CopyCharacters could lead to undefined behaviour

2016-10-09 Thread Xiang Zhang
Xiang Zhang added the comment: Fine. :-) -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue28379] PyUnicode_CopyCharacters could lead to undefined behaviour

2016-10-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This is just a cleaning up of not very important code. -- ___ Python tracker ___

[issue28379] PyUnicode_CopyCharacters could lead to undefined behaviour

2016-10-09 Thread Xiang Zhang
Xiang Zhang added the comment: We don't need to remove it for 3.5 and 3.6? -- ___ Python tracker ___ ___

[issue28379] PyUnicode_CopyCharacters could lead to undefined behaviour

2016-10-09 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue28379] PyUnicode_CopyCharacters could lead to undefined behaviour

2016-10-09 Thread Roundup Robot
Roundup Robot added the comment: New changeset 1be8cd7cee92 by Serhiy Storchaka in branch 'default': Issue #28379: Removed redundant check. https://hg.python.org/cpython/rev/1be8cd7cee92 -- ___ Python tracker

[issue28379] PyUnicode_CopyCharacters could lead to undefined behaviour

2016-10-08 Thread Xiang Zhang
Xiang Zhang added the comment: Thanks Serhiy! But sorry I think I have made a mistake. In unicode_copycharacters we don't need PyUnicode_READY since it has been done in argument parse. Could you remove it? -- stage: resolved -> patch review status: closed -> open Added file:

[issue28379] PyUnicode_CopyCharacters could lead to undefined behaviour

2016-10-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you for your contribution. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue28379] PyUnicode_CopyCharacters could lead to undefined behaviour

2016-10-08 Thread Roundup Robot
Roundup Robot added the comment: New changeset 13addd71b751 by Serhiy Storchaka in branch '3.5': Issue #28379: Added sanity checks and tests for PyUnicode_CopyCharacters(). https://hg.python.org/cpython/rev/13addd71b751 -- nosy: +python-dev ___

[issue28379] PyUnicode_CopyCharacters could lead to undefined behaviour

2016-10-07 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: -> serhiy.storchaka ___ Python tracker ___

[issue28379] PyUnicode_CopyCharacters could lead to undefined behaviour

2016-10-07 Thread Xiang Zhang
Xiang Zhang added the comment: v2 applies Serhiy's suggestions. -- Added file: http://bugs.python.org/file45001/PyUnicode_CopyCharacters_v2.patch ___ Python tracker

[issue28379] PyUnicode_CopyCharacters could lead to undefined behaviour

2016-10-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Added comments on Rietveld. I don't know whether tests for this function are needed. It is public, but is not a part of stable API. -- ___ Python tracker

[issue28379] PyUnicode_CopyCharacters could lead to undefined behaviour

2016-10-06 Thread Xiang Zhang
Changes by Xiang Zhang : Added file: http://bugs.python.org/file44990/PyUnicode_CopyCharacters.patch ___ Python tracker ___

[issue28379] PyUnicode_CopyCharacters could lead to undefined behaviour

2016-10-06 Thread Xiang Zhang
Changes by Xiang Zhang : Removed file: http://bugs.python.org/file44989/PyUnicode_CopyCharacters.patch ___ Python tracker ___

[issue28379] PyUnicode_CopyCharacters could lead to undefined behaviour

2016-10-06 Thread Xiang Zhang
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)