[ros-diffs] [pschweitzer] 34731: Bugfix in FsRtlIsHpfsDbcsLegal and FsRtlIsFatDbcsLegal: First byte of double byte character cannot finish the string
pschweitzer at svn.reactos.org
pschweitzer at svn.reactos.org
Thu Jul 24 10:19:00 CEST 2008
Author: pschweitzer
Date: Thu Jul 24 03:19:00 2008
New Revision: 34731
URL: http://svn.reactos.org/svn/reactos?rev=34731&view=rev
Log:
Bugfix in FsRtlIsHpfsDbcsLegal and FsRtlIsFatDbcsLegal:
First byte of double byte character cannot finish the string
Modified:
branches/pierre-fsd/ntoskrnl/fsrtl/dbcsname.c
Modified: branches/pierre-fsd/ntoskrnl/fsrtl/dbcsname.c
URL: http://svn.reactos.org/svn/reactos/branches/pierre-fsd/ntoskrnl/fsrtl/dbcsname.c?rev=34731&r1=34730&r2=34731&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:19:00 2008
@@ -252,6 +252,8 @@
/* First make sure the character it's not the Lead DBCS */
if (FsRtlIsLeadDbcsCharacter(FirstPart.Buffer[i]))
{
+ if (i == (FirstPart.Length / sizeof(CHAR)) - 1)
+ return FALSE;
i++;
}
else if ((FirstPart.Buffer[i] < 0x1F) || (FirstPart.Buffer[i] == 0x22) ||
@@ -392,6 +394,8 @@
/* First make sure the character it's not the Lead DBCS */
if (FsRtlIsLeadDbcsCharacter(FirstPart.Buffer[i]))
{
+ if (i == (FirstPart.Length / sizeof(CHAR)) - 1)
+ return FALSE;
i++;
}
else if ((FirstPart.Buffer[i] < 0x1F) || (FirstPart.Buffer[i] == 0x22) ||
More information about the Ros-diffs
mailing list