提交 07070076 编写于 作者: B Bastian Kröger 提交者: Enrico Giordani

[PR] Fixed pointer overflow crash when using bgsave under rare circumstances.

上级 ddb99875
......@@ -37,10 +37,9 @@ void EnsureMemoryIsMapped(const void *buffer, size_t size) {
if ((size_t) (pEnd - pStart) > Globals::pageSize) {
size_t offset = 0;
while (offset < size) {
if (size < offset) {
offset += Globals::pageSize;
if (offset > size) {
offset = size;
} else {
offset += Globals::pageSize;
}
c = *((char*) (p + offset));
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册