➜

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
标题: Wrong size calculation in posix_execve
类型: behavior Stage: test needed
Components: Extension Modules Versions: Python 3.1, Python 3.2
process
状态: closed Resolution: fixed
Dependencies: 后续:
分配给: 抄送列表: BreamoreBoy, Rhamphoryncus, loewis, vstinner
优先级: normal 关键字:

Created on 2008-06-09 23:28 by Rhamphoryncus, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (3)
msg67880 - (view) Author: Adam Olsen (Rhamphoryncus) 日期: 2008-06-09 23:28
In 2.x, the size of C string needed for an environment variable used by
posix_execve was calculated using PyString_GetSize.  In 3.0 this is
translated to PyUnicode_GetSize.  However, in 3.0 the C string is the
UTF-8 encoded version of the unicode object, which doesn't necessarily
have the same length as what PyUnicode_GetSize reports.

The simplest solution I see is to use strlen() instead.
msg109895 - (view) Author: Mark Lawrence (BreamoreBoy) * 日期: 2010-07-10 17:08
Any core C developers have any input on this one?
msg109902 - (view) Author: STINNER Victor (vstinner) * (Python committer) 日期: 2010-07-10 17:43
Yes, I fixed it in 3.1 (r80494) and 3.2 (r80421): see issue #8391.
历史
日期 用户 动作 参数
2022-04-11 14:56:35admin修改github: 47320
2010-07-10 17:43:55vstinner修改状态: open -> closed
resolution: fixed
消息: + msg109902
2010-07-10 17:08:46BreamoreBoy修改抄送: + BreamoreBoy

消息: + msg109895
versions: + Python 3.2
2009-05-13 22:34:38ajaksu2修改versions: + Python 3.1, - Python 3.0
抄送: + loewis, vstinner

优先级: normal
type: behavior
stage: test needed
2008-06-09 23:28:50Rhamphoryncus创建