Fix fencepost error in readlink; inspired by OpenBSD

This commit is contained in:
Warner Losh 1998-09-09 17:14:17 +00:00
parent 1508e89cc6
commit 8521ef096a
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=39014

View File

@ -631,7 +631,7 @@ dump_file (p, curdev, toplevel)
int size;
char *buf = alloca (PATH_MAX + 1);
size = readlink (p, buf, PATH_MAX + 1);
size = readlink (p, buf, PATH_MAX);
if (size < 0)
goto badperror;
buf[size] = '\0';