[issue3070] Wrong size calculation in posix_execve

Adam Olsen 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
messages: 67880
nosy: Rhamphoryncus
severity: normal
status: open
title: Wrong size calculation in posix_execve
versions: Python 3.0

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue3070>
_______________________________________


More information about the Python-bugs-list mailing list