fix: symlink failed or the size was truncated at modulo 256 if the target was over 255 bytes

N2009_11_14_FIXES
szaka 2008-04-02 10:29:22 +00:00
parent a07e900359
commit 69423166cb
2 changed files with 3 additions and 3 deletions

View File

@ -73,7 +73,7 @@ extern ntfs_inode *ntfs_create(ntfs_inode *dir_ni, le32 securid,
extern ntfs_inode *ntfs_create_device(ntfs_inode *dir_ni, le32 securid,
ntfschar *name, u8 name_len, dev_t type, dev_t dev);
extern ntfs_inode *ntfs_create_symlink(ntfs_inode *dir_ni, le32 securid,
ntfschar *name, u8 name_len, ntfschar *target, u8 target_len);
ntfschar *name, u8 name_len, ntfschar *target, int target_len);
extern int ntfs_check_empty_dir(ntfs_inode *ni);
extern int ntfs_delete(ntfs_volume *vol, const char *path,
ntfs_inode *ni, ntfs_inode *dir_ni, ntfschar *name,

View File

@ -1157,7 +1157,7 @@ err_out:
*/
static ntfs_inode *__ntfs_create(ntfs_inode *dir_ni, le32 securid,
ntfschar *name, u8 name_len, dev_t type, dev_t dev,
ntfschar *target, u8 target_len)
ntfschar *target, int target_len)
{
ntfs_inode *ni;
int rollback_data = 0, rollback_sd = 0;
@ -1420,7 +1420,7 @@ ntfs_inode *ntfs_create_device(ntfs_inode *dir_ni, le32 securid,
}
ntfs_inode *ntfs_create_symlink(ntfs_inode *dir_ni, le32 securid,
ntfschar *name, u8 name_len, ntfschar *target, u8 target_len)
ntfschar *name, u8 name_len, ntfschar *target, int target_len)
{
if (!target || !target_len) {
ntfs_log_error("Invalid arguments.\n");