Bug 973138 - Block DLLs that match the MovieMode pattern. r=bsmedberg, a=sledru
authorDavid Major <dmajor@mozilla.com>
Tue, 15 Apr 2014 11:40:42 +1200
changeset 192196 743afab610fa
parent 192195 4ee9435a9863
child 192197 5ad3f17e39d2
push id3519
push userryanvm@gmail.com
push date2014-05-05 16:58 +0000
treeherdermozilla-beta@c219fc2b4cc2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbsmedberg, sledru
bugs973138
milestone30.0
Bug 973138 - Block DLLs that match the MovieMode pattern. r=bsmedberg, a=sledru
mozglue/build/WindowsDllBlocklist.cpp
--- a/mozglue/build/WindowsDllBlocklist.cpp
+++ b/mozglue/build/WindowsDllBlocklist.cpp
@@ -507,16 +507,27 @@ patched_LdrLoadDll (PWCHAR filePath, PUL
   }
 
   dllName[len] = 0;
 
 #ifdef DEBUG_very_verbose
   printf_stderr("LdrLoadDll: dll name '%s'\n", dllName);
 #endif
 
+  // Block a suspicious binary that uses various 12-digit hex strings
+  // e.g. MovieMode.48CA2AEFA22D.dll (bug 973138)
+  char * dot = strchr(dllName, '.');
+  if (dot && (strchr(dot+1, '.') == dot+13)) {
+    char * end = nullptr;
+    _strtoui64(dot+1, &end, 16);
+    if (end == dot+13) {
+      return STATUS_DLL_NOT_FOUND;
+    }
+  }
+
   // then compare to everything on the blocklist
   info = &sWindowsDllBlocklist[0];
   while (info->name) {
     if (strcmp(info->name, dllName) == 0)
       break;
 
     info++;
   }