[New-bugs-announce] [issue3070] Wrong size calculation in posix_execve
report at bugs.python.org
Tue Jun 10 01:28:51 CEST 2008
New submission from Adam Olsen <rhamph at gmail.com>:
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.
components: Extension Modules
title: Wrong size calculation in posix_execve
versions: Python 3.0
Python tracker <report at bugs.python.org>
More information about the New-bugs-announce