mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-07-17 16:47:50 +00:00
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 <xemul@parallels.com>
This commit is contained in:
parent
f965ead8b8
commit
12a0462f7e
1 changed files with 1 additions and 1 deletions
2
util.c
2
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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue