* src/remake.c (name_mtime): Reserve space for nul in readlink result

Copyright-paperwork-exempt: yes
This commit is contained in:
Tobias Stoeckmann 2015-07-12 11:52:32 +02:00 committed by Paul Smith
parent 97a8d9b45a
commit 0fb6f2d985

View file

@ -1563,7 +1563,7 @@ name_mtime (const char *name)
mtime = ltime;
/* Set up to check the file pointed to by this link. */
EINTRLOOP (llen, readlink (lpath, lbuf, GET_PATH_MAX));
EINTRLOOP (llen, readlink (lpath, lbuf, GET_PATH_MAX - 1));
if (llen < 0)
{
/* Eh? Just take what we have. */