[0.4.11] [RDBSS] Avoid CORE-13938
authorJoachim Henze <Joachim.Henze@reactos.org>
Sat, 17 Feb 2018 19:28:15 +0000 (20:28 +0100)
committerJoachim Henze <Joachim.Henze@reactos.org>
Wed, 12 Dec 2018 22:07:49 +0000 (23:07 +0100)
Pierre recommended this hack-fix for 0.4.8rls before.
Avoids "GetVolumeInformation now fails on NFS volume"

I will not retest any RDBSS functionality myself in my tests,
maybe some other tester would be kind enough to retest this?

Please note that I replaced #if 0 with #if 1
as discussed with Pierre. That's different to the patch in ticket.

like in last release
(cherry picked from commit 1906186e83ddc3800064fa61fc700a074105a41d)

sdk/lib/drivers/rdbsslib/rdbss.c

index 8822d03..28958a4 100644 (file)
@@ -8173,6 +8173,16 @@ RxQueryNameInfo(
         return STATUS_BUFFER_OVERFLOW;
     }
 
+#if 1 // CORE-13938, rfb: please note I replaced 0 with 1 here
+    if (NodeType(Fcb) == RDBSS_NTC_STORAGE_TYPE_DIRECTORY &&
+        RxContext->Info.LengthRemaining >= sizeof(WCHAR))
+    {
+        NameInfo->FileName[NameInfo->FileNameLength / sizeof(WCHAR)] = L'\\';
+        NameInfo->FileNameLength += sizeof(WCHAR);
+        RxContext->Info.LengthRemaining -= sizeof(WCHAR);
+    }
+#endif
+
     /* All correct */
     return STATUS_SUCCESS;
 }