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