[MOUNTMGR] Simplify a bit the code in MountMgrQueryDosVolumePath(s) (#6990)

This commit is contained in:
Hermès Bélusca-Maïto 2025-01-19 22:54:02 +01:00
parent e72a9a78b0
commit 28c3533d11
No known key found for this signature in database
GPG key ID: 3B2539C65E7B93D0

View file

@ -856,7 +856,7 @@ MountMgrQueryDosVolumePath(IN PDEVICE_EXTENSION DeviceExtension,
}
/* Construct string for query */
SymbolicName.Length = Target->DeviceNameLength;
SymbolicName.Length =
SymbolicName.MaximumLength = Target->DeviceNameLength;
SymbolicName.Buffer = Target->DeviceName;
@ -1482,8 +1482,8 @@ MountMgrQueryDosVolumePaths(IN PDEVICE_EXTENSION DeviceExtension,
}
/* Construct string for query */
SymbolicName.Length = Target->DeviceNameLength;
SymbolicName.MaximumLength = Target->DeviceNameLength + sizeof(UNICODE_NULL);
SymbolicName.Length =
SymbolicName.MaximumLength = Target->DeviceNameLength;
SymbolicName.Buffer = Target->DeviceName;
/* Find device with our info */