[issue15954] No error checking after using of the wcsxfrm()

2017-03-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset be487a65f18e1be5fde03e2977fff4be53cc2fbf by Serhiy Storchaka in branch 'master': bpo-15954: Check return code of wcsxfrm(). (#508) https://github.com/python/cpython/commit/be487a65f18e1be5fde03e2977fff4be53cc2fbf --

[issue15954] No error checking after using of the wcsxfrm()

2017-03-06 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: -> serhiy.storchaka resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.7 -Python 3.4, Python 3.5 ___ Python tracker

[issue15954] No error checking after using of the wcsxfrm()

2017-03-06 Thread Mark Lawrence
Changes by Mark Lawrence : -- nosy: -BreamoreBoy ___ Python tracker ___ ___

[issue15954] No error checking after using of the wcsxfrm()

2017-03-06 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- pull_requests: +417 ___ Python tracker ___ ___

[issue15954] No error checking after using of the wcsxfrm()

2014-06-15 Thread Mark Lawrence
Mark Lawrence added the comment: @Serhiy will you follow up on this? -- nosy: +BreamoreBoy versions: +Python 3.4, Python 3.5 -Python 3.2, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15954

[issue15954] No error checking after using of the wcsxfrm()

2014-06-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I have no Windows and can't provide relevant test case. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15954 ___

[issue15954] No error checking after using of the wcsxfrm()

2014-06-15 Thread Mark Lawrence
Mark Lawrence added the comment: @Serhiy you don't need Windows, msg170593 refers to a Linux man page. Reading your msg170595 I'd guess that you've got confused with a similar function that is Windows specific. -- ___ Python tracker

[issue15954] No error checking after using of the wcsxfrm()

2012-09-24 Thread STINNER Victor
STINNER Victor added the comment: Dummy question: can you provide an example of strings that make wcsxfrm() failing? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15954 ___

[issue15954] No error checking after using of the wcsxfrm()

2012-09-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Dummy question: can you provide an example of strings that make wcsxfrm() failing? No, I can not (on Linux). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15954

[issue15954] No error checking after using of the wcsxfrm()

2012-09-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: What error message is most appropriate here? Can we return the original string instead of exception? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15954

[issue15954] No error checking after using of the wcsxfrm()

2012-09-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: No, I think the appropriate error is ValueError, at least if errno is EINVAL. With what message? msvcrt gives EILSEQ or ERANGE, but never EINVAL. EILSEQ is returned if LCMapString failed, and ERANE if the output buffer is too small. I don't see where

[issue15954] No error checking after using of the wcsxfrm()

2012-09-18 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@gmail.com: -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15954 ___ ___ Python-bugs-list

[issue15954] No error checking after using of the wcsxfrm()

2012-09-17 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: The wcsxfrm() function may fail but there is no error check code. I don't know what exception type should be used here: OSError with an errno EINVAL or some specialized type. I can't prepare tests, because I don't know under what conditions it would be

[issue15954] No error checking after using of the wcsxfrm()

2012-09-17 Thread Christian Heimes
Christian Heimes added the comment: Have you tried code points beyond the BMP? The C function doesn't have a return value that signals an error. An explicit check of errno is required. http://linux.die.net/man/3/wcsxfrm -- nosy: +christian.heimes

[issue15954] No error checking after using of the wcsxfrm()

2012-09-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is a sample patch (to specify the location of the issue). I don't sure OSError is well here. As far as I understand, this function is Windows-specific, so I can't check how it works with code points beyond the BMP or with surrogates. --

[issue15954] No error checking after using of the wcsxfrm()

2012-09-17 Thread Christian Heimes
Christian Heimes added the comment: The patch looks good. `s` and `buf` are cleaned up after the exit label. -- stage: - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15954 ___

[issue15954] No error checking after using of the wcsxfrm()

2012-09-17 Thread Martin v . Löwis
Martin v. Löwis added the comment: I don't know what exception type should be used here: OSError with an errno EINVAL or some specialized type. No, I think the appropriate error is ValueError, at least if errno is EINVAL. because I don't know under what conditions it would be possible