https://git.reactos.org/?p=reactos.git;a=commitdiff;h=a77a65ab6db39ce20c79a…
commit a77a65ab6db39ce20c79a7846ba8f18c941cf308
Author: Victor Perevertkin <victor.perevertkin(a)reactos.org>
AuthorDate: Sat Aug 1 04:58:08 2020 +0300
Commit: Victor Perevertkin <victor.perevertkin(a)reactos.org>
CommitDate: Sat Aug 1 04:58:08 2020 +0300
[MOUNTMGR] Avoid an endless loop while sending GUID_IO_VOLUME_NAME_CHANGE
notification
---
drivers/filters/mountmgr/notify.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/filters/mountmgr/notify.c b/drivers/filters/mountmgr/notify.c
index 9a1e7885ac8..2c7a05dbc88 100644
--- a/drivers/filters/mountmgr/notify.c
+++ b/drivers/filters/mountmgr/notify.c
@@ -370,8 +370,9 @@ MountMgrNotifyNameChange(IN PDEVICE_EXTENSION DeviceExtension,
if (ValidateVolume)
{
/* Then, ensure we can find the device */
- NextEntry = DeviceExtension->DeviceListHead.Flink;
- while (NextEntry != &(DeviceExtension->DeviceListHead))
+ for (NextEntry = DeviceExtension->DeviceListHead.Flink;
+ NextEntry != &DeviceExtension->DeviceListHead;
+ NextEntry = NextEntry->Flink)
{
DeviceInformation = CONTAINING_RECORD(NextEntry, DEVICE_INFORMATION,
DeviceListEntry);
if (RtlCompareUnicodeString(DeviceName,
&(DeviceInformation->DeviceName), TRUE) == 0)