The readlink()
function reads where a link points to. It makes no effort to null-terminate its second argument, buffer
. Instead, it just returns the number of characters it has written.
...
Noncompliant Code Example
If len
is equal to sizeof(buf)
, the null terminator is written one byte past the end of buf
.
...