mirror of
https://git.code.sf.net/p/ntfs-3g/ntfs-3g.git
synced 2024-11-23 10:04:00 +08:00
Fixed possible null dereferencings
A null directory pointer could appear as being dereferenced. Fix that, though it probably never occurs in real conditions.
This commit is contained in:
parent
cd68a084fc
commit
39579a045d
@ -2026,7 +2026,7 @@ static int ntfs_fuse_create(const char *org_path, mode_t typemode, dev_t dev,
|
|||||||
if (!dir_ni || (dir_ni->mft_no == FILE_Extend)) {
|
if (!dir_ni || (dir_ni->mft_no == FILE_Extend)) {
|
||||||
free(path);
|
free(path);
|
||||||
res = -errno;
|
res = -errno;
|
||||||
if (dir_ni->mft_no == FILE_Extend)
|
if (dir_ni)
|
||||||
res = -EPERM;
|
res = -EPERM;
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
@ -2373,7 +2373,7 @@ static int ntfs_fuse_rm(const char *org_path)
|
|||||||
/* deny unlinking metadata files from $Extend */
|
/* deny unlinking metadata files from $Extend */
|
||||||
if (!dir_ni || (dir_ni->mft_no == FILE_Extend)) {
|
if (!dir_ni || (dir_ni->mft_no == FILE_Extend)) {
|
||||||
res = -errno;
|
res = -errno;
|
||||||
if (dir_ni->mft_no == FILE_Extend)
|
if (dir_ni)
|
||||||
res = -EPERM;
|
res = -EPERM;
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user