summaryrefslogtreecommitdiffstats
path: root/libglusterfs
diff options
context:
space:
mode:
Diffstat (limited to 'libglusterfs')
-rw-r--r--libglusterfs/src/inode.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/libglusterfs/src/inode.c b/libglusterfs/src/inode.c
index b0c9abd980c..0ad7b3585b5 100644
--- a/libglusterfs/src/inode.c
+++ b/libglusterfs/src/inode.c
@@ -859,6 +859,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) &&