mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-23 21:17:52 +00:00
Bug 584680 - nsWindowsDllBlocklist.cpp fails to compile on mingw; r=ehsan
This commit is contained in:
parent
53200f0d4e
commit
ab683f979b
@ -72,6 +72,8 @@ patched_LdrLoadDll (PWCHAR filePath, PULONG flags, PUNICODE_STRING moduleFileNam
|
||||
// We have UCS2 (UTF16?), we want ASCII, but we also just want the filename portion
|
||||
#define DLLNAME_MAX 128
|
||||
char dllName[DLLNAME_MAX+1];
|
||||
wchar_t *dll_part;
|
||||
DllBlockInfo *info;
|
||||
|
||||
int len = moduleFileName->Length / 2;
|
||||
wchar_t *fname = moduleFileName->Buffer;
|
||||
@ -89,7 +91,7 @@ patched_LdrLoadDll (PWCHAR filePath, PULONG flags, PUNICODE_STRING moduleFileNam
|
||||
goto continue_loading;
|
||||
}
|
||||
|
||||
wchar_t *dll_part = wcsrchr(fname, L'\\');
|
||||
dll_part = wcsrchr(fname, L'\\');
|
||||
if (dll_part) {
|
||||
dll_part = dll_part + 1;
|
||||
len -= dll_part - fname;
|
||||
@ -135,7 +137,7 @@ patched_LdrLoadDll (PWCHAR filePath, PULONG flags, PUNICODE_STRING moduleFileNam
|
||||
#endif
|
||||
|
||||
// then compare to everything on the blocklist
|
||||
DllBlockInfo *info = &sWindowsDllBlocklist[0];
|
||||
info = &sWindowsDllBlocklist[0];
|
||||
while (info->name) {
|
||||
if (strcmp(info->name, dllName) == 0)
|
||||
break;
|
||||
@ -174,7 +176,7 @@ patched_LdrLoadDll (PWCHAR filePath, PULONG flags, PUNICODE_STRING moduleFileNam
|
||||
// If we failed to get the version information, we block.
|
||||
|
||||
if (infoSize != 0) {
|
||||
nsAutoArrayPtr<unsigned char> infoData = new unsigned char[infoSize];
|
||||
nsAutoArrayPtr<unsigned char> infoData(new unsigned char[infoSize]);
|
||||
VS_FIXEDFILEINFO *vInfo;
|
||||
UINT vInfoLen;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user