Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ntfsprogs/mkntfs): use after free #137

Open
wants to merge 1 commit into
base: edge
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions ntfsprogs/mkntfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -4683,10 +4683,10 @@ static BOOL mkntfs_create_root_structures(void)
1);
if ((u32)(1 << -bs->clusters_per_mft_record) !=
g_vol->mft_record_size) {
free(bs);
ntfs_log_error("BUG: calculated clusters_per_mft_record"
" is wrong (= 0x%x)\n",
bs->clusters_per_mft_record);
free(bs);
return FALSE;
}
}
Expand All @@ -4700,11 +4700,11 @@ static BOOL mkntfs_create_root_structures(void)
bs->clusters_per_index_record = -g_vol->indx_record_size_bits;
if ((1 << -bs->clusters_per_index_record) !=
(s32)g_vol->indx_record_size) {
free(bs);
ntfs_log_error("BUG: calculated "
"clusters_per_index_record is wrong "
"(= 0x%x)\n",
bs->clusters_per_index_record);
free(bs);
return FALSE;
}
}
Expand Down