From: Andreas Schneider <asn@xxxxxxxxxxxxxx> Signed-off-by: Andreas Schneider <asn@xxxxxxxxxxxxxx> --- drivers/staging/exfat/exfat_super.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/staging/exfat/exfat_super.c b/drivers/staging/exfat/exfat_super.c index 5f6caee819a6..b63186a67af6 100644 --- a/drivers/staging/exfat/exfat_super.c +++ b/drivers/staging/exfat/exfat_super.c @@ -1300,6 +1300,9 @@ static int ffsMoveFile(struct inode *old_parent_inode, struct file_id_t *fid, } /* check the validity of directory name in the given new pathname */ + if (strlen(new_path) >= MAX_NAME_LENGTH) + return FFS_NAMETOOLONG; + ret = resolve_path(new_parent_inode, new_path, &newdir, &uni_name); if (ret) goto out2; -- 2.21.0