Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
strbuf_readlink: don't call readlink twice if hint is the exact link …
…size strbuf_readlink() calls readlink() twice if the hint argument specifies the exact size of the link target (e.g. by passing stat.st_size as returned by lstat()). This is necessary because 'readlink(..., hint) == hint' could mean that the buffer was too small. Use hint + 1 as buffer size to prevent this. Signed-off-by: Karsten Blees <blees@dcon.de>
- Loading branch information