mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-12-22 00:42:06 +01:00
Fix fencepost error in readlink; inspired by OpenBSD
This commit is contained in:
parent
1508e89cc6
commit
8521ef096a
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=39014
@ -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';
|
||||
|
Loading…
Reference in New Issue
Block a user