This is the mail archive of the
cygwin-apps
mailing list for the Cygwin project.
Re: which for cygwin 1.7
- From: Corinna Vinschen <corinna-cygwin at cygwin dot com>
- To: cygwin-apps at cygwin dot com
- Date: Sat, 13 Dec 2008 10:40:21 +0100
- Subject: Re: which for cygwin 1.7
- References: <4942E9D4.1070808@acm.org>
- Reply-to: cygwin-apps at cygwin dot com
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