Reported-by: Jonny Grant <jg@jguk.org>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
which has size
.IR bufsiz .
.BR readlink ()
-does not append a null byte to
+does not append a terminating null byte to
.IR buf .
It will (silently) truncate the contents (to a length of
.I bufsiz
exit(EXIT_FAILURE);
}
+ /* Print only \(aqnbytes\(aq of \(aqbuf\(aq, as it doesn't contain a terminating
+ null byte (\(aq\e0\(aq). */
printf("\(aq%s\(aq points to \(aq%.*s\(aq\en", argv[1], (int) nbytes, buf);
/* If the return value was equal to the buffer size, then the