This is the mail archive of the cygwin-apps mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: which for cygwin 1.7


On Dec 12 14:46, David Rothenberger wrote:
> I've been looking at rebuilding which for cygwin 1.7. I think there are a 
> lot of problems with the current code. It uses static buffers of PATH_MAX 
> all over the place, some of which are passed to getcwd().

For a start that would be fine.  By rebuilding you get static buffers
of the new PATH_MAX size.  As long as which checks if the path length
doesn't exceed the buffer size, it should be safe to use.  It wouldn't
work for paths > 4K, but that's a far way off.  Just check if it uses
strlen() > PATH_MAX or strncpy(a,b,PATH_MAX) sort of expressions.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]