Always check page_allocated in vm::check_addr

This commit is contained in:
Nekotekina 2019-08-11 23:31:49 +03:00
parent d45c743877
commit f8f3067deb
7 changed files with 13 additions and 10 deletions

View file

@ -567,7 +567,7 @@ bool GDBDebugServer::cmd_write_memory(gdb_cmd & cmd)
u32 len = hex_to_u32(cmd.data.substr(s + 1, s2 - s - 1));
const char* data_ptr = (cmd.data.c_str()) + s2 + 1;
for (u32 i = 0; i < len; ++i) {
if (vm::check_addr(addr + i, 1, vm::page_allocated | vm::page_writable)) {
if (vm::check_addr(addr + i, 1, vm::page_writable)) {
u8 val;
int res = sscanf_s(data_ptr, "%02hhX", &val);
if (!res) {