diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/staging/lustre/lustre/llite/file.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/staging/lustre/lustre/llite/file.c b/drivers/staging/lustre/lustre/llite/file.c index d3874e1..4a33638 100644 --- a/drivers/staging/lustre/lustre/llite/file.c +++ b/drivers/staging/lustre/lustre/llite/file.c @@ -1719,6 +1719,9 @@ int ll_fid2path(struct inode *inode, void __user *arg) if (get_user(pathlen, &gfin->gf_pathlen)) return -EFAULT; + if (pathlen > PATH_MAX) + return -EINVAL; + outsize = sizeof(*gfout) + pathlen; OBD_ALLOC(gfout, outsize); |