Skip to content

Commit

Permalink
Added range check.
Browse files Browse the repository at this point in the history
  • Loading branch information
prsyahmi committed Feb 7, 2017
1 parent 6554c61 commit 2787e17
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions BadMemoryManager/BadMemoryManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,9 @@ void AddEntry()
if (region.LowerBound == 0 && region.UpperBound == 0) {
MessageBoxA(0, "Please specify correct address for both lower address and upper address", "Invalid input", MB_OK);
return;
} else if (region.LowerBound >= region.UpperBound) {
MessageBoxA(0, "Incorrect range", "Invalid input", MB_OK);
return;
}

SetWindowTextA(LowerBoundHwnd, "");
Expand Down

0 comments on commit 2787e17

Please sign in to comment.