Fix off-by-one.
MFC after: 1 day
This commit is contained in:
parent
3e83ac2bfa
commit
0546aa1b97
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=272971
@ -149,9 +149,9 @@ getent(char *bp, char *name, const char *cfile)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (cp >= bp + BUFSIZ) {
|
if (cp >= bp + BUFSIZ - 1) {
|
||||||
write(STDERR_FILENO, "Remcap entry too long\n",
|
write(STDERR_FILENO, "Remcap entry too long\n",
|
||||||
23);
|
22);
|
||||||
break;
|
break;
|
||||||
} else
|
} else
|
||||||
*cp++ = c;
|
*cp++ = c;
|
||||||
|
Loading…
Reference in New Issue
Block a user