On Fri, Dec 16, 2011 at 9:00 AM, Russ Allbery wrote:

> Thanks to a lot of work by the Hurd folks, there's quite a bit less than
> there used to be.  :)
>
> I haven't looked at the patch in this thread, but most of the time that
> I've seen PATH_MAX used in software, it's indicated a design flaw in an
> interface: use of static buffers for file paths rather than adjusting to
> arbitrary length of file names.  You can arguably "fix" it by defining
> PATH_MAX to something arbitrary, but usually the better fix is to go back
> and fix the incorrect choice of API to use a caller-provided buffer or to
> do memory allocation instead.

I tend to see upstreams defining their own PATH_MAX rather than
calling pathconf. Perhaps there needs to be a lintian warning about
that.

-- 
bye,
pabs

http://wiki.debian.org/PaulWise


--
To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/CAKTje6GBF=vyb-e4dsotyq8h2plwdf5hs8u14rh+a0abpvd...@mail.gmail.com

Reply via email to