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 boya
Recipients boya, christian.heimes, exarkun, facundobatista, georg.brandl, giampaolo.rodola, gregory.p.smith, nbm, smurfix
Date 2009-09-01.22:46:53
SpamBayes Score 8.58956e-07
Marked as misclassified No
Message-id <1251845215.49.0.948087421466.issue2722@psf.upfronthosting.co.za>
In-reply-to
Content
This bug occurred in posix_getcwd() and is being fixed. 
Should the following code in posix_getcwdu() also be fixed the same way?

posix_getcwdu(PyObject *self, PyObject *noargs)
{
	char buf[1026];
        ...
#if defined(PYOS_OS2) && defined(PYCC_GCC)
	res = _getcwd2(buf, sizeof buf);
#else
	res = getcwd(buf, sizeof buf);
#endif
        ...
}

In my opinion, the fixed length buf should be discarded and instead
allocate memory to buf as needed (as the fix code in posix_getcwd()),
since getcwd() does not have a maximum anymore.
History
Date User Action Args
2009-09-01 22:46:55boyasetrecipients: + boya, georg.brandl, facundobatista, gregory.p.smith, exarkun, giampaolo.rodola, christian.heimes, smurfix, nbm
2009-09-01 22:46:55boyasetmessageid: <1251845215.49.0.948087421466.issue2722@psf.upfronthosting.co.za>
2009-09-01 22:46:54boyalinkissue2722 messages
2009-09-01 22:46:53boyacreate