On Sat, 26 Mar 2016 15:41:14 +0100
Hiltjo Posthuma <[email protected]> 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.

Attachment: pgpcXKItZQyQI.pgp
Description: OpenPGP digital signature

Reply via email to