Re: [hackers] [ubase][PATCH v2] Add pwdx(1)
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
Received on Sat Mar 26 2016 - 15:41:14 CET
This archive was generated by hypermail 2.3.0
: Sat Mar 26 2016 - 15:48:14 CET