VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/ExpandVolume/ExpandVolume.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ExpandVolume/ExpandVolume.c')
-rw-r--r--src/ExpandVolume/ExpandVolume.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/ExpandVolume/ExpandVolume.c b/src/ExpandVolume/ExpandVolume.c
index 84f6cfe8..f62d93ae 100644
--- a/src/ExpandVolume/ExpandVolume.c
+++ b/src/ExpandVolume/ExpandVolume.c
@@ -442,6 +442,12 @@ int ExtendFileSystem (HWND hwndDlg , wchar_t *lpszVolume, Password *pVolumePassw
goto error;
}
+ if ((BytesPerSector == 0) || (BytesPerSector > (DWORD)INT_MAX))
+ {
+ nStatus = ERR_SECTOR_SIZE_INCOMPATIBLE;
+ goto error;
+ }
+
DebugAddProgressDlgStatus (hwndDlg, L"Extending file system ...\r\n");
// extend volume