Message85657
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. |
|
| Date |
User |
Action |
Args |
| 2009-04-06 17:42:43 | amaury.forgeotdarc | set | recipients:
+ amaury.forgeotdarc, loewis, giampaolo.rodola, marcelo_fernandez |
| 2009-04-06 17:42:43 | amaury.forgeotdarc | set | messageid: <[email protected]> |
| 2009-04-06 17:42:42 | amaury.forgeotdarc | link | issue5672 messages |
| 2009-04-06 17:42:41 | amaury.forgeotdarc | create | |
|