Erroneous use of getcwd on lib/nspath.c]

Ricardo Jose Maraschini ricardo.maraschini at opservices.com.br
Fri Oct 26 20:10:41 CEST 2012


----- Forwarded message from Ricardo Jose Maraschini <ricardo.maraschini at opservices.com.br> -----

> Date: Fri, 26 Oct 2012 16:09:01 -0200
> From: Ricardo Jose Maraschini <ricardo.maraschini at opservices.com.br>
> To: Andreas Ericsson <ae at op5.se>
> User-Agent: Mutt/1.5.21 (2010-09-15)
> Subject: Re: [Nagios-devel] Erroneous use of getcwd on lib/nspath.c
> 
> * Ricardo Jose Maraschini (ricardo.maraschini at opservices.com.br) wrote:
> > Hi Andreas,
> > 
> > Good to read from you :)
> 
> Oh, forget everythin i've wrote.
> I've seen your commits just a few seconds ago :-D


Gosh! mutt has trolled me again. Just copying the list.



> 
> -rm
> 
> > 
> > * 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
> > 

----- End forwarded message -----

------------------------------------------------------------------------------
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