mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 00:55:48 +00:00
Fix my copypasta spotted by (coverity 1294)
svn path=/trunk/; revision=36479
This commit is contained in:
parent
c96b189f38
commit
4046f15afe
1 changed files with 2 additions and 2 deletions
|
@ -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;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue