Fix my copypasta spotted by (coverity 1294)

svn path=/trunk/; revision=36479
This commit is contained in:
Art Yerkes 2008-09-24 12:56:30 +00:00
parent c96b189f38
commit 4046f15afe

View file

@ -1692,7 +1692,7 @@ KdbpSafeWriteMemory(OUT PVOID Dest,
IN PVOID Src, IN PVOID Src,
IN ULONG Bytes) IN ULONG Bytes)
{ {
BOOLEAN Result; BOOLEAN Result = TRUE;
ULONG_PTR Start, End, Write; ULONG_PTR Start, End, Write;
for (Start = (ULONG_PTR)Src, for (Start = (ULONG_PTR)Src,
@ -1700,7 +1700,7 @@ KdbpSafeWriteMemory(OUT PVOID Dest,
Write = (ULONG_PTR)Dest; Write = (ULONG_PTR)Dest;
Result && (Start < End); Result && (Start < End);
Start++, Write++) Start++, Write++)
if (!KdpSafeReadMemory(Start, 1, (PVOID)Write)) if (!KdpSafeWriteMemory(Write, 1, *((PCHAR)Start)))
Result = FALSE; Result = FALSE;
return Result ? STATUS_SUCCESS : STATUS_ACCESS_VIOLATION; return Result ? STATUS_SUCCESS : STATUS_ACCESS_VIOLATION;