On Thu, Apr 30, 2020 at 04:20:46AM -0700, youngjun wrote:
> kernfs_path_from_node_locked checks buf is NULL.
> But, two cases below are not covered.
>
> if(!kn_to)<--- case1 (buf can be NULL)
> return strlcpy(buf, "(null)", buflen);
>
> if(kn_from == kn_to) <---
kernfs_path_from_node_locked checks buf is NULL.
But, two cases below are not covered.
if(!kn_to) <--- case1 (buf can be NULL)
return strlcpy(buf, "(null)", buflen);
if(kn_from == kn_to)<--- case2 (buf can be NULL)
return strlcpy(buf, "/", buflen);
On Wed, Jul 24, 2019 at 10:22:42AM +0800, Jia-Ju Bai wrote:
> In kernfs_path_from_node_locked(), there is an if statement on line 147
> to check whether buf is NULL:
> if (buf)
>
> When buf is NULL, it is used on line 151:
> len += strlcpy(buf + len, parent_str, ...)
> and line 158:
>
In kernfs_path_from_node_locked(), there is an if statement on line 147
to check whether buf is NULL:
if (buf)
When buf is NULL, it is used on line 151:
len += strlcpy(buf + len, parent_str, ...)
and line 158:
len += strlcpy(buf + len, "/", ...)
and line 160:
len += strlcpy(buf + l
4 matches
Mail list logo