readlink() returns the number of bytes that it has written excluding any NUL byte (since it does not write that itself.) This could lead to attempting to access beyond the end of buffer if the destination of the link is exactly 100 bytes long. The standard solution to this is to subtract one from the buffer when passing it into readlink(). Signed-off-by: Rob Bradford <rob@linux.intel.com>
parent
ec913fdfde
commit
273fec8ede
Loading…
Reference in new issue