Re: [hackers] [ubase][PATCH v2] Add pwdx(1)

From: Mattias Andrée <maandree_AT_kth.se>
Date: Sat, 26 Mar 2016 15:43:24 +0100

On Sat, 26 Mar 2016 15:41:14 +0100
Hiltjo Posthuma <hiltjo_AT_codemadness.org> wrote:

> On Sat, Mar 26, 2016 at 12:58:37PM +0100, Mattias Andr??e
> wrote:
> > +
> > + for (; argc > 0; argc--, argv++) {
> > + n = snprintf(path, sizeof(path),
> > "/proc/%s/cwd", *argv);
> > + if (n < 0 || n > sizeof(path)) {
> > + errno = ESRCH;
>
> The line:
>
> > + if (n < 0 || n > sizeof(path)) {
>
> Should be:
>
> > + if (n < 0 || n >= sizeof(path)) {
>
> Kind regards,
> Hiltjo
>

Whoops.

Received on Sat Mar 26 2016 - 15:43:24 CET

This archive was generated by hypermail 2.3.0 : Sat Mar 26 2016 - 15:48:16 CET