Commit 12a0462f authored by Pavel Emelyanov's avatar Pavel Emelyanov

util: Shorten array for anon_inode link checking

Strictly speaking the fd link can point to PATH_MAX string, but for the sake of
is_anonfd_link 32 bytes is enough -- even if the target string is longer it will not
match the required anon_inode:xxx string.
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent f965ead8
...@@ -281,7 +281,7 @@ bool is_anon_inode(struct statfs *statfs) ...@@ -281,7 +281,7 @@ bool is_anon_inode(struct statfs *statfs)
int is_anon_link_type(int lfd, char *type) int is_anon_link_type(int lfd, char *type)
{ {
char link[PATH_MAX], aux[32]; char link[32], aux[32];
ssize_t ret; ssize_t ret;
snprintf(aux, sizeof(aux), "/proc/self/fd/%d", lfd); snprintf(aux, sizeof(aux), "/proc/self/fd/%d", lfd);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment