This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Incorrect dst buffer size for MultiByteToWideChar in _Py_fopen_obj
Type: enhancement Stage: resolved
Components: IO, Windows Versions: Python 3.7, Python 3.6
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: izbyshev, miss-islington, paul.moore, serhiy.storchaka, steve.dower, tim.golden, vstinner, zach.ware
Priority: normal Keywords: patch

Created on 2018-02-18 16:58 by izbyshev, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 5739 merged izbyshev, 2018-02-18 17:05
PR 5741 merged miss-islington, 2018-02-18 17:58
PR 5742 merged miss-islington, 2018-02-18 17:59
Messages (5)
msg312314 - (view) Author: Alexey Izbyshev (izbyshev) * (Python triager) Date: 2018-02-18 16:58
MultiByteToWideChar expects the destination buffer size to be given in wide characters, not bytes.

This is currently not a real issue since _Py_fopen_obj is only used internally with mode being a short constant string in all call sites I've found.
msg312318 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2018-02-18 17:57
New changeset b3b4a9d3001f1fc7df8efcccdce081de54fa5eab by Serhiy Storchaka (Alexey Izbyshev) in branch 'master':
bpo-32869: Fix incorrect dst buffer size for MultiByteToWideChar (#5739)
https://github.com/python/cpython/commit/b3b4a9d3001f1fc7df8efcccdce081de54fa5eab
msg312322 - (view) Author: miss-islington (miss-islington) Date: 2018-02-18 18:40
New changeset ca82e3c0ec4d0d5ce4e1ffec98cc341cb5913446 by Miss Islington (bot) in branch '3.7':
bpo-32869: Fix incorrect dst buffer size for MultiByteToWideChar (GH-5739)
https://github.com/python/cpython/commit/ca82e3c0ec4d0d5ce4e1ffec98cc341cb5913446
msg312324 - (view) Author: miss-islington (miss-islington) Date: 2018-02-18 18:58
New changeset 65a13c19e86488119cc9bc192f5a0b846d90940f by Miss Islington (bot) in branch '3.6':
bpo-32869: Fix incorrect dst buffer size for MultiByteToWideChar (GH-5739)
https://github.com/python/cpython/commit/65a13c19e86488119cc9bc192f5a0b846d90940f
msg312330 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2018-02-18 22:27
Thank you for your PR Alexey.
History
Date User Action Args
2022-04-11 14:58:57adminsetgithub: 77050
2018-02-18 22:27:06serhiy.storchakasetmessages: + msg312330
2018-02-18 22:10:32izbyshevsetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2018-02-18 18:58:11miss-islingtonsetmessages: + msg312324
2018-02-18 18:40:09miss-islingtonsetnosy: + miss-islington
messages: + msg312322
2018-02-18 17:59:32miss-islingtonsetpull_requests: + pull_request5519
2018-02-18 17:58:41miss-islingtonsetpull_requests: + pull_request5518
2018-02-18 17:57:26serhiy.storchakasetnosy: + serhiy.storchaka
messages: + msg312318
2018-02-18 17:05:17izbyshevsetkeywords: + patch
stage: patch review
pull_requests: + pull_request5517
2018-02-18 16:58:54izbyshevcreate