summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Brianceau <jbriance@cisco.com>2015-07-24 14:58:15 +0200
committerJulien Brianceau <jbriance@cisco.com>2015-07-26 09:30:04 +0000
commit15bdc611bf372c818d47a400689ea4a0a4331f5c (patch)
treee3b636eb0e4e5a145d1943b799a09039c1a178fb
parent30dd24ef89999833eb58b0a930b03377a5a5458c (diff)
downloadqtwebkit-15bdc611bf372c818d47a400689ea4a0a4331f5c.tar.gz
[mips] Fix potential crash in OSAllocatorPosix
As it is rightly said in https://bugs.webkit.org/show_bug.cgi?id=125920#c2, result should be updated if we want to return the 2nd half of the mmaped area. Change-Id: I83dc6548d80138934565e53a4646d472dfd30210 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
-rw-r--r--Source/WTF/wtf/OSAllocatorPosix.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/Source/WTF/wtf/OSAllocatorPosix.cpp b/Source/WTF/wtf/OSAllocatorPosix.cpp
index f676b0393..fb24cd9ac 100644
--- a/Source/WTF/wtf/OSAllocatorPosix.cpp
+++ b/Source/WTF/wtf/OSAllocatorPosix.cpp
@@ -87,6 +87,7 @@ void* OSAllocator::reserveUncommitted(size_t bytes, Usage usage, bool writable,
// 2nd half is good, release 1st half.
if (munmap(result, bytes))
CRASH();
+ result = reinterpret_cast<int8_t*>(result) + bytes;
} else
ASSERT_NOT_REACHED();
}