pwdx: Fix a misleading comment.

It sounds like an off-by-one, but the code itself is correct.
This commit is contained in:
Qualys Security Advisory 1970-01-01 00:00:00 +00:00 committed by Craig Small
parent 6df9ffb341
commit daec51a06c

2
pwdx.c
View File

@ -104,7 +104,7 @@ int main(int argc, char *argv[])
for (i = 0; i < argc; i++) { for (i = 0; i < argc; i++) {
char *s; char *s;
ssize_t len, buflen; ssize_t len, buflen;
/* Constant 10 is the length of strings "/proc/" + "/cwd" + 1 */ /* Constant 10 is the length of strings "/proc/" + "/cwd" */
char *buf; char *buf;
buflen = 10 + strlen(argv[i]) + 1; buflen = 10 + strlen(argv[i]) + 1;
buf = xmalloc(buflen); buf = xmalloc(buflen);