Commit 400f0c18 authored by Bobby Holley's avatar Bobby Holley
Browse files

Bug 1747925 - Revert pointer-arithmetic change in malloc_in_sandbox. r=shravanrn

Because get_unsandboxed_pointer is templated, the original code was
correct.

Differential Revision: https://phabricator.services.mozilla.com/D134800
parent fe354152
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -556,7 +556,7 @@ public:
    }
    detail::dynamic_check(is_pointer_in_sandbox_memory(ptr),
                          "Malloc returned pointer outside the sandbox memory");
    auto ptr_end = reinterpret_cast<uintptr_t>(ptr + (total_size - 1));
    auto ptr_end = reinterpret_cast<uintptr_t>(ptr + (count - 1));
    detail::dynamic_check(
      is_in_same_sandbox(ptr, reinterpret_cast<void*>(ptr_end)),
      "Malloc returned a pointer whose range goes beyond sandbox memory");