Commit 4efa41f3 authored by mlippautz's avatar mlippautz Committed by Commit bot

[base] Fix check that makes sure we commit in the virtual memory range.

R=jochen@chromium.org
BUG=chromium:533342
LOG=N

Review URL: https://codereview.chromium.org/1349723005

Cr-Commit-Position: refs/heads/master@{#30831}
parent 610c0300
......@@ -363,10 +363,10 @@ class VirtualMemory {
private:
bool InVM(void* address, size_t size) {
return (reinterpret_cast<intptr_t>(address_) <=
reinterpret_cast<intptr_t>(address)) &&
(reinterpret_cast<intptr_t>(address_) + size_ >=
reinterpret_cast<intptr_t>(address) + size);
return (reinterpret_cast<uintptr_t>(address_) <=
reinterpret_cast<uintptr_t>(address)) &&
((reinterpret_cast<uintptr_t>(address_) + size_) >=
(reinterpret_cast<uintptr_t>(address) + size));
}
void* address_; // Start address of the virtual memory.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment