sys: FspFsvolQueryStreamInformationCopy: fix vulnerability reported by Johan von Konow

This commit is contained in:
Bill Zissimopoulos committed 2026-10-13 16:15:38 +03:00
1 parent ebd50e1956
commit 4c3cf58fe7
1 file changed
+1 -1
+1 -1
View File
@@ -635,7 +635,7 @@ static NTSTATUS FspFsvolQueryStreamInformationCopy(
{\ {\
PWSTR StreamName = Info->StreamName;\ PWSTR StreamName = Info->StreamName;\
ULONG Length[3];\ ULONG Length[3];\
Length[0] = 0 < CopyLength ? sizeof(WCHAR) : 0;\ Length[0] = sizeof(WCHAR) <= CopyLength ? sizeof(WCHAR) : CopyLength;\
Length[1] = Info->StreamNameLength - STREAM_EXTRA_LENGTH < CopyLength - Length[0] ?\ Length[1] = Info->StreamNameLength - STREAM_EXTRA_LENGTH < CopyLength - Length[0] ?\
Info->StreamNameLength - STREAM_EXTRA_LENGTH : CopyLength - Length[0];\ Info->StreamNameLength - STREAM_EXTRA_LENGTH : CopyLength - Length[0];\
Length[2] = CopyLength - Length[0] - Length[1];\ Length[2] = CopyLength - Length[0] - Length[1];\