VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Driver/Ntdriver.c
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2015-08-09 00:16:07 +0200
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2015-08-09 00:17:46 +0200
commitf9c3bcd384622abe38a141b1035fede90b2d595a (patch)
treead60ffd03b2f2f060d755c975ffe0869de4d7161 /src/Driver/Ntdriver.c
parent96520e22bd3cb44411d7d096473ac048d5855f9d (diff)
downloadVeraCrypt-f9c3bcd384622abe38a141b1035fede90b2d595a.tar.gz
VeraCrypt-f9c3bcd384622abe38a141b1035fede90b2d595a.zip
Windows: Solve crash of TOR when run from VeraCrypt volume by explicitly returning error code when unsupported IOCTL_STORAGE_QUERY_PROPERTY parameter encountered.
Diffstat (limited to 'src/Driver/Ntdriver.c')
-rw-r--r--src/Driver/Ntdriver.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/Driver/Ntdriver.c b/src/Driver/Ntdriver.c
index 0a71d08b..519fdc09 100644
--- a/src/Driver/Ntdriver.c
+++ b/src/Driver/Ntdriver.c
@@ -636,6 +636,10 @@ NTSTATUS ProcessVolumeDeviceControlIrp (PDEVICE_OBJECT DeviceObject, PEXTENSION
PSTORAGE_PROPERTY_QUERY pStoragePropQuery = (PSTORAGE_PROPERTY_QUERY) Irp->AssociatedIrp.SystemBuffer;
STORAGE_QUERY_TYPE type = pStoragePropQuery->QueryType;
+ /* return error if an unsupported type is encountered */
+ Irp->IoStatus.Status = STATUS_INVALID_PARAMETER;
+ Irp->IoStatus.Information = 0;
+
if (type == PropertyExistsQuery)
{
if (pStoragePropQuery->PropertyId == StorageAccessAlignmentProperty)