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.

Author amaury.forgeotdarc
Recipients amaury.forgeotdarc, giampaolo.rodola, loewis, marcelo_fernandez
Date 2009-04-06.17:42:41
SpamBayes Score 2.598538e-11
Marked as misclassified No
Message-id <1239039763.66.0.441498255465.issue5672@psf.upfronthosting.co.za>
In-reply-to
Content
Some remarks about the patch:
1 - this line causes a buffer overrun:
    strncpy(argv[0], name , strlen(name));
A possible solution is to do like posix_putenv(): have a static PyString
that holds the memory, and just change the pointer argv[0]:
    argv[0] = PyString_AS_STRING(name);

2 - The function should update sys.argv as well. In this case,
os.getprocname is not necessary.
History
Date User Action Args
2009-04-06 17:42:43amaury.forgeotdarcsetrecipients: + amaury.forgeotdarc, loewis, giampaolo.rodola, marcelo_fernandez
2009-04-06 17:42:43amaury.forgeotdarcsetmessageid: <1239039763.66.0.441498255465.issue5672@psf.upfronthosting.co.za>
2009-04-06 17:42:42amaury.forgeotdarclinkissue5672 messages
2009-04-06 17:42:41amaury.forgeotdarccreate