From 9c5319b69fb5739964a629f2073dfc50769b4e7c Mon Sep 17 00:00:00 2001 From: Joachim Henze Date: Sat, 17 Feb 2018 20:28:15 +0100 Subject: [PATCH] [0.4.13][RDBSS] Avoid CORE-13938 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 26080d0c644e3f503948ca2a722813c47acc71bc) --- sdk/lib/drivers/rdbsslib/rdbss.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/sdk/lib/drivers/rdbsslib/rdbss.c b/sdk/lib/drivers/rdbsslib/rdbss.c index 489d3116570..fc03cb6e9f9 100644 --- a/sdk/lib/drivers/rdbsslib/rdbss.c +++ b/sdk/lib/drivers/rdbsslib/rdbss.c @@ -8319,6 +8319,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; }