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/dbcsna... ============================================================================== --- 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) ||