diff --git a/fs/ntfs3/index.c b/fs/ntfs3/index.c index 6d1bf890929d..717e7ffe3474 100644 --- a/fs/ntfs3/index.c +++ b/fs/ntfs3/index.c @@ -1164,6 +1164,8 @@ int indx_find(struct ntfs_index *indx, struct ntfs_inode *ni, fnd_clear(fnd); /* Lookup entry that is <= to the search value. */ + if (key_len == 0) + return -EINVAL; e = hdr_find_e(indx, &root->ihdr, key, key_len, ctx, diff); if (!e) return -EINVAL;