Fix a warning emitted by Clang.
The size passed to strlcat() must depend on the input length, not the output length. Because the input and output buffers are equal in size, the resulting binary does not change at all.
This commit is contained in:
parent
5ddfea8c43
commit
24a92ae013
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=227090
@ -212,7 +212,8 @@ realpath(const char * __restrict path, char * __restrict resolved)
|
||||
symlink[slen] = '/';
|
||||
symlink[slen + 1] = 0;
|
||||
}
|
||||
left_len = strlcat(symlink, left, sizeof(left));
|
||||
left_len = strlcat(symlink, left,
|
||||
sizeof(symlink));
|
||||
if (left_len >= sizeof(left)) {
|
||||
if (m)
|
||||
free(resolved);
|
||||
|
Loading…
Reference in New Issue
Block a user