From 6e2b742680a0db0b135d52abb125faa0c65701c5 Mon Sep 17 00:00:00 2001 From: Filip Navara Date: Wed, 24 Nov 2004 18:13:18 +0000 Subject: [PATCH] - Fix pointer arithmetic on FileName variable in NtCreateProcess (spotted by Arty). svn path=/trunk/; revision=11798 --- reactos/ntoskrnl/ps/process.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/reactos/ntoskrnl/ps/process.c b/reactos/ntoskrnl/ps/process.c index cfd2098e87b..7c6ab94bf6a 100644 --- a/reactos/ntoskrnl/ps/process.c +++ b/reactos/ntoskrnl/ps/process.c @@ -1,4 +1,4 @@ -/* $Id: process.c,v 1.156 2004/11/21 21:09:43 weiden Exp $ +/* $Id: process.c,v 1.157 2004/11/24 18:13:18 navaraf Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -875,7 +875,7 @@ NtCreateProcess(OUT PHANDLE ProcessHandle, } FileName = SectionObject->FileObject->FileName; - szSrc = (PWCHAR)(FileName.Buffer + FileName.Length - 1); + szSrc = (PWCHAR)(FileName.Buffer + (FileName.Length / sizeof(WCHAR)) - 1); while(szSrc >= FileName.Buffer) { if(*szSrc == L'\\')