diff options
Diffstat (limited to 'libglusterfs/src/inode.c')
-rw-r--r-- | libglusterfs/src/inode.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libglusterfs/src/inode.c b/libglusterfs/src/inode.c index 5b41cd7b5..858f7e14d 100644 --- a/libglusterfs/src/inode.c +++ b/libglusterfs/src/inode.c @@ -833,6 +833,13 @@ inode_path (inode_t *inode, trav = __dentry_search_arbit (trav->parent)) { i ++; /* "/" */ i += strlen (trav->name); + if (i > PATH_MAX) { + gf_log ("inode", GF_LOG_CRITICAL, + "possible infinite loop detected, " + "forcing break. name=(%s)", name); + ret = -ENOENT; + goto unlock; + } } if ((inode->ino != 1) && |