Erroneous use of getcwd on lib/nspath.c
Ricardo Jose Maraschini
ricardo.maraschini at opservices.com.br
Fri Oct 26 20:06:52 CEST 2012
Hi Andreas,
Good to read from you :)
* Andreas Ericsson (ae at op5.se) wrote:
> I think you mean PATH_MAX. 4096 is the upper limit, so we'll be fine
> using that (except for truly pathological cases where someone may
> use a system where PATH_MAX is larger).
Correct me if I'm wrong, but here you prefer to leave an static value
instead a macro that has been created exactly for this pourpose?
This doesn't make sense to me. At least you don't want to include
limits.h.
> We need an extra byte to spare for a nul byte in case the system we're
> on doesn't leave any room for it in its getcwd() implementation (AIX,
> for instance).
Oh, ok. I didn't know that some unix treat the function differently.
Glad to learn this.
> > Is it sounds resonable?
>
> Sort of, but it's not important and the current code works just fine
> as it is, so I'll drop this patch for now, apart from the return
> code check thing.
So, what about the segfault i've received when running with thousands of
directories pointing to main config file? It will remain the there
because you want to?
Thanks for reading and keep with the good job.
-rm
------------------------------------------------------------------------------
The Windows 8 Center
In partnership with Sourceforge
Your idea - your app - 30 days. Get started!
http://windows8center.sourceforge.net/
what-html-developers-need-to-know-about-coding-windows-8-metro-style-apps/
More information about the Developers
mailing list