Bug 1546545: Part 1 - Properly store pointer to sandboxed DLL intercepted method r=aklotz

Bug 1533808 introduced code to intercept DLL methods that the Chromium sandbox had already intercepted.  That patch did not store the the pointer to the intercepted function in the trampoline data, as is done when intercepting other methods.

Differential Revision: https://phabricator.services.mozilla.com/D28612

--HG--
extra : moz-landing-system : lando
This commit is contained in:
David Parks 2019-04-26 00:49:32 +00:00
Родитель a23fce0b97
Коммит d9d0882177
1 изменённых файлов: 4 добавлений и 4 удалений

Просмотреть файл

@ -595,13 +595,13 @@ class WindowsDllDetourPatcher final : public WindowsDllPatcherBase<VMPolicy> {
tramp.WriteEncodedPointer(nullptr);
});
if (PatchIfTargetIsRecognizedTrampoline(tramp, origBytes, aDest,
aOutTramp)) {
tramp.WritePointer(origBytes.AsEncodedPtr());
if (!tramp) {
return;
}
tramp.WritePointer(origBytes.AsEncodedPtr());
if (!tramp) {
if (PatchIfTargetIsRecognizedTrampoline(tramp, origBytes, aDest,
aOutTramp)) {
return;
}