This is the mail archive of the
mailing list for the glibc project.
Re: [PATCH] support: Implement <support/descriptors.h> to track file descriptors
On Thu, Nov 29, 2018 at 10:44:10PM -0500, Carlos O'Donell wrote:
> On 11/27/18 12:25 PM, Florian Weimer wrote:
> > + char path;
> Why not PATH_MAX?
> We should not stat a truncated fd path since it might match another fd?
> assert (strlen(e->d_name) < PATH_MAX);
> > + snprintf (path, sizeof (path), "/proc/self/fd/%ld", fd);
Or just use xasprintf instead.