From f56ed41f01fbf24fce1f93e3635eac1c07990f96 Mon Sep 17 00:00:00 2001 From: Makoto Kato Date: Fri, 2 Aug 2013 10:35:25 +0900 Subject: [PATCH] Bug 900436 - WindowsDllNopSpacePatcher doesn't work on Windows 8. r=ehsan --- toolkit/xre/nsWindowsDllInterceptor.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/toolkit/xre/nsWindowsDllInterceptor.h b/toolkit/xre/nsWindowsDllInterceptor.h index 00a97b6e7acb..71731717d3ea 100644 --- a/toolkit/xre/nsWindowsDllInterceptor.h +++ b/toolkit/xre/nsWindowsDllInterceptor.h @@ -159,14 +159,14 @@ public: bool WriteHook(byteptr_t fn, intptr_t hookDest, void **origFunc) { - // Check that the 5 bytes before fn are NOP's, and that the 2 bytes after - // fn are mov(edi, edi). + // Check that the 5 bytes before fn are NOP's or INT 3's, + // and that the 2 bytes after fn are mov(edi, edi). // // It's safe to read fn[-5] because we set it to PAGE_EXECUTE_READWRITE // before calling WriteHook. for (int i = -5; i <= -1; i++) { - if (fn[i] != 0x90) // nop + if (fn[i] != 0x90 && fn[i] != 0xcc) // nop or int 3 return false; }