[ros-diffs] [pschweitzer] 34732: Bugfix in FsRtlDissectDbcs and FsRtlDissectName: After tests, it appears that, on Windows, MaximumLength is set to Length. That way, we avoid some calculation problems that occurred.

pschweitzer at svn.reactos.org pschweitzer at svn.reactos.org
Thu Jul 24 10:45:27 CEST 2008


Author: pschweitzer
Date: Thu Jul 24 03:45:26 2008
New Revision: 34732

URL: http://svn.reactos.org/svn/reactos?rev=34732&view=rev
Log:
Bugfix in FsRtlDissectDbcs and FsRtlDissectName:
After tests, it appears that, on Windows, MaximumLength is set to Length.
That way, we avoid some calculation problems that occurred.

Modified:
    branches/pierre-fsd/ntoskrnl/fsrtl/dbcsname.c
    branches/pierre-fsd/ntoskrnl/fsrtl/name.c

Modified: branches/pierre-fsd/ntoskrnl/fsrtl/dbcsname.c
URL: http://svn.reactos.org/svn/reactos/branches/pierre-fsd/ntoskrnl/fsrtl/dbcsname.c?rev=34732&r1=34731&r2=34732&view=diff
==============================================================================
--- branches/pierre-fsd/ntoskrnl/fsrtl/dbcsname.c [iso-8859-1] (original)
+++ branches/pierre-fsd/ntoskrnl/fsrtl/dbcsname.c [iso-8859-1] Thu Jul 24 03:45:26 2008
@@ -85,14 +85,14 @@
     /* Set up the first result string */
     FirstPart->Buffer = Name.Buffer + SkipFirstSlash;
     FirstPart->Length = (FirstPosition - SkipFirstSlash) * sizeof(CHAR);
-    FirstPart->MaximumLength = Name.MaximumLength - FirstPart->Length;
+    FirstPart->MaximumLength = FirstPart->Length;
 
     /* And second one, if necessary */
     if (FirstPosition < (Name.Length / sizeof(CHAR)))
     {
         RemainingPart->Buffer = Name.Buffer + FirstPosition + 1;
         RemainingPart->Length = Name.Length - (FirstPosition + 1) * sizeof(CHAR);
-        RemainingPart->MaximumLength = Name.MaximumLength - RemainingPart->Length;
+        RemainingPart->MaximumLength = RemainingPart->Length;
     }
 }
 

Modified: branches/pierre-fsd/ntoskrnl/fsrtl/name.c
URL: http://svn.reactos.org/svn/reactos/branches/pierre-fsd/ntoskrnl/fsrtl/name.c?rev=34732&r1=34731&r2=34732&view=diff
==============================================================================
--- branches/pierre-fsd/ntoskrnl/fsrtl/name.c [iso-8859-1] (original)
+++ branches/pierre-fsd/ntoskrnl/fsrtl/name.c [iso-8859-1] Thu Jul 24 03:45:26 2008
@@ -173,14 +173,14 @@
     /* Set up the first result string */
     FirstPart->Buffer = Name.Buffer + SkipFirstSlash;
     FirstPart->Length = (FirstPosition - SkipFirstSlash) * sizeof(WCHAR);
-    FirstPart->MaximumLength = Name.MaximumLength - FirstPart->Length;
+    FirstPart->MaximumLength = FirstPart->Length;
 
     /* And second one, if necessary */
     if (FirstPosition < (Name.Length / sizeof(WCHAR)))
     {
         RemainingPart->Buffer = Name.Buffer + FirstPosition + 1;
         RemainingPart->Length = Name.Length - (FirstPosition + 1) * sizeof(WCHAR);
-        RemainingPart->MaximumLength = Name.MaximumLength - RemainingPart->Length;
+        RemainingPart->MaximumLength = RemainingPart->Length;
     }
 }
 



More information about the Ros-diffs mailing list