On Mon, 04 Jul 2016 22:24:02 -0700, Philip Guenther wrote:
> Yep. Too much programming in a garbage collected language recently, I
> guess. :-)
>
> Revised diff below.
OK millert@
- todd
On Wed, 29 Jun 2016, Todd C. Miller wrote:
> On Wed, 29 Jun 2016 07:05:15 -0600, "Todd C. Miller" wrote:
> > Don't you need to make a copy of dp->d_name? Returning dp->d_name
> > after closedir() seems dangerous.
>
> Since closedir() frees dd_buf this would result in a user after free.
Yep. Too
On Wed, 29 Jun 2016, Marc Espie wrote:
> On Tue, Jun 28, 2016 at 09:46:30PM -0700, Philip Guenther wrote:
> > Inspired by espie@'s ttyname.c diff, here's a simplification of libc's
> > fallback-to-scanning-/dev code for devname(). Since devname() returns
> > the "name under /dev", this eliminate
On Wed, 29 Jun 2016 07:05:15 -0600, "Todd C. Miller" wrote:
> Don't you need to make a copy of dp->d_name? Returning dp->d_name
> after closedir() seems dangerous.
Since closedir() frees dd_buf this would result in a user after
free.
- todd
On Tue, 28 Jun 2016 21:46:30 -0700, Philip Guenther wrote:
> Inspired by espie@'s ttyname.c diff, here's a simplification of libc's
> fallback-to-scanning-/dev code for devname(). Since devname() returns
> the "name under /dev", this eliminates the string manipulation == win!
>
> Works when test
On Tue, Jun 28, 2016 at 09:46:30PM -0700, Philip Guenther wrote:
> Inspired by espie@'s ttyname.c diff, here's a simplification of libc's
> fallback-to-scanning-/dev code for devname(). Since devname() returns
> the "name under /dev", this eliminates the string manipulation == win!
>
> Works when
Inspired by espie@'s ttyname.c diff, here's a simplification of libc's
fallback-to-scanning-/dev code for devname(). Since devname() returns
the "name under /dev", this eliminates the string manipulation == win!
Works when tested with "stat -Lf %Sr" on a symlink to a device with
/var/run/dev.db c