ntfs_pathname_to_inode(): converting long file names to Unicode may failed

master
szaka 2007-05-29 21:04:05 +00:00
parent f96c61be9f
commit 436d36f933
1 changed files with 4 additions and 1 deletions

View File

@ -466,11 +466,14 @@ ntfs_inode *ntfs_pathname_to_inode(ntfs_volume *vol, ntfs_inode *parent,
q++;
}
len = ntfs_mbstoucs(p, &unicode, NTFS_MAX_NAME_LEN);
len = ntfs_mbstoucs(p, &unicode, MAX_PATH);
if (len < 0) {
ntfs_log_debug("Couldn't convert name to Unicode: %s.\n", p);
err = errno;
goto close;
} else if (len > NTFS_MAX_NAME_LEN) {
err = ENAMETOOLONG;
goto close;
}
inum = ntfs_inode_lookup_by_name(ni, unicode, len);