Author: janderwald
Date: Mon Jun 22 01:35:40 2009
New Revision: 41517
URL:
http://svn.reactos.org/svn/reactos?rev=41517&view=rev
Log:
- Fix a buffer overrun
Modified:
trunk/reactos/drivers/ksfilter/ks/irp.c
Modified: trunk/reactos/drivers/ksfilter/ks/irp.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/ksfilter/ks/irp.c?…
==============================================================================
--- trunk/reactos/drivers/ksfilter/ks/irp.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/ksfilter/ks/irp.c [iso-8859-1] Mon Jun 22 01:35:40 2009
@@ -775,9 +775,9 @@
if (IoStack->FileObject->FileName.Buffer[0] != L'{')
{
RtlMoveMemory(IoStack->FileObject->FileName.Buffer,
&IoStack->FileObject->FileName.Buffer[Length+1],
- IoStack->FileObject->FileName.Length - Length *
sizeof(WCHAR));
-
- IoStack->FileObject->FileName.Length -= Length *
sizeof(WCHAR);
+ IoStack->FileObject->FileName.Length - (Length +
1) * sizeof(WCHAR));
+
+ IoStack->FileObject->FileName.Length -= (Length + 1)*
sizeof(WCHAR);
}