Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(91081)

#28379: PyUnicode_CopyCharacters could lead to undefined behaviour

Can't Edit
Can't Publish+Mail
Start Review
Created:
2 years, 10 months ago by angwerzx
Modified:
2 years, 10 months ago
Reviewers:
storchaka+cpython
CC:
haypo, devnull_psf.upfronthosting.co.za, storchaka, xiang.zhang
Visibility:
Public.

Patch Set 1 #

Total comments: 4

Patch Set 2 #

Total comments: 2

Patch Set 3 #

Total comments: 4

Patch Set 4 #

Unified diffs Side-by-side diffs Delta from patch set Stats Patch
Modules/_testcapimodule.c View 1 2 3 1 chunk +0 lines, -4 lines 0 comments Download

Messages

Total messages: 3
storchaka
http://bugs.python.org/review/28379/diff/18788/Doc/c-api/unicode.rst File Doc/c-api/unicode.rst (right): http://bugs.python.org/review/28379/diff/18788/Doc/c-api/unicode.rst#newcode575 Doc/c-api/unicode.rst:575: .. c:function:: int PyUnicode_CopyCharacters(PyObject *to, Py_ssize_t to_start, \ Returns ...
2 years, 10 months ago #1
xiang.zhang
http://bugs.python.org/review/28379/diff/18788/Doc/c-api/unicode.rst File Doc/c-api/unicode.rst (right): http://bugs.python.org/review/28379/diff/18788/Doc/c-api/unicode.rst#newcode575 Doc/c-api/unicode.rst:575: .. c:function:: int PyUnicode_CopyCharacters(PyObject *to, Py_ssize_t to_start, \ On ...
2 years, 10 months ago #2
storchaka
2 years, 10 months ago #3
http://bugs.python.org/review/28379/diff/18797/Lib/test/test_unicode.py
File Lib/test/test_unicode.py (right):

http://bugs.python.org/review/28379/diff/18797/Lib/test/test_unicode.py#newco...
Lib/test/test_unicode.py:2761: min(5-from_start, 5))
Just 5-from_start.

http://bugs.python.org/review/28379/diff/18797/Lib/test/test_unicode.py#newco...
Lib/test/test_unicode.py:2767: min(5-to_start, 5))
Just 5-to_start.

http://bugs.python.org/review/28379/diff/18797/Lib/test/test_unicode.py#newco...
Lib/test/test_unicode.py:2769: # narrow -> wide
Hmm, I don't think that creating not valid strings is good idea. This can
trigger some debug assertion. I'll omit these tests.

http://bugs.python.org/review/28379/diff/18797/Lib/test/test_unicode.py#newco...
Lib/test/test_unicode.py:2773: self.assertEqual(repr(s).strip('\''), from_)
strip("'")
Sign in to reply to this message.

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+