Zebediah Figura : mountmgr: Return STATUS_BUFFER_OVERFLOW if an insufficient buffer is passed to IOCTL_MOUNTMGR_QUERY_POINTS.

Alexandre Julliard julliard at winehq.org
Tue Aug 31 15:40:22 CDT 2021


Module: wine
Branch: master
Commit: a200c47c329b6f0cd6904f629f555b1841b17665
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=a200c47c329b6f0cd6904f629f555b1841b17665

Author: Zebediah Figura <zfigura at codeweavers.com>
Date:   Mon Aug 30 22:25:58 2021 -0500

mountmgr: Return STATUS_BUFFER_OVERFLOW if an insufficient buffer is passed to IOCTL_MOUNTMGR_QUERY_POINTS.

Signed-off-by: Zebediah Figura <zfigura at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/kernel32/tests/volume.c | 4 ++--
 dlls/mountmgr.sys/mountmgr.c | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/dlls/kernel32/tests/volume.c b/dlls/kernel32/tests/volume.c
index 4915e744eba..cb35de6add1 100644
--- a/dlls/kernel32/tests/volume.c
+++ b/dlls/kernel32/tests/volume.c
@@ -1678,8 +1678,8 @@ static void test_mountmgr_query_points(void)
     memset(output, 0xcc, sizeof(*output));
     status = NtDeviceIoControlFile( file, NULL, NULL, NULL, &io,
             IOCTL_MOUNTMGR_QUERY_POINTS, input, sizeof(*input), output, sizeof(*output) );
-    todo_wine ok(status == STATUS_BUFFER_OVERFLOW, "got %#x\n", status);
-    todo_wine ok(io.Status == STATUS_BUFFER_OVERFLOW, "got status %#x\n", io.Status);
+    ok(status == STATUS_BUFFER_OVERFLOW, "got %#x\n", status);
+    ok(io.Status == STATUS_BUFFER_OVERFLOW, "got status %#x\n", io.Status);
     todo_wine ok(io.Information == offsetof(MOUNTMGR_MOUNT_POINTS, MountPoints[0]), "got information %#Ix\n", io.Information);
     ok(output->Size > offsetof(MOUNTMGR_MOUNT_POINTS, MountPoints[0]), "got size %u\n", output->Size);
     todo_wine ok(output->NumberOfMountPoints && output->NumberOfMountPoints != 0xcccccccc,
diff --git a/dlls/mountmgr.sys/mountmgr.c b/dlls/mountmgr.sys/mountmgr.c
index a61140d847e..d5cf1ae5c4b 100644
--- a/dlls/mountmgr.sys/mountmgr.c
+++ b/dlls/mountmgr.sys/mountmgr.c
@@ -196,7 +196,7 @@ static NTSTATUS query_mount_points( void *buff, SIZE_T insize,
         info = buff;
         info->Size = size;
         iosb->Information = sizeof(info->Size);
-        return STATUS_MORE_ENTRIES;
+        return STATUS_BUFFER_OVERFLOW;
     }
 
     input = HeapAlloc( GetProcessHeap(), 0, insize );




More information about the wine-cvs mailing list