From 12a0462f7e4fe8ffd869dd7346be2dc7ccb6500b Mon Sep 17 00:00:00 2001 From: Pavel Emelyanov Date: Wed, 11 Jul 2012 12:58:46 +0400 Subject: [PATCH] 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: Pavel Emelyanov --- util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util.c b/util.c index 9fed02af5..4969e8d1d 100644 --- a/util.c +++ b/util.c @@ -281,7 +281,7 @@ bool is_anon_inode(struct statfs *statfs) int is_anon_link_type(int lfd, char *type) { - char link[PATH_MAX], aux[32]; + char link[32], aux[32]; ssize_t ret; snprintf(aux, sizeof(aux), "/proc/self/fd/%d", lfd);