#include <assert.h> // This include is required in order for content_decryption_module to work // on Unix systems. #include <stddef.h> #include <string.h>
static uint32_t NumExpectedHostFiles(const cdm::HostFile* aHostFiles,
uint32_t aNumFiles) { #ifdefined(ANDROID) // We expect 1 binary: clearkey return1; #elif !defined(XP_WIN) // We expect 4 binaries: clearkey, libxul, plugin-container, and Firefox. return4; #else // On Windows we might be using the parent binary not plugin-container for the // gmp processes. In which case we will have 3 not 4 files. const std::wstring plugincontainer = L"plugin-container.exe"; for (uint32_t i = 0; i < aNumFiles; i++) { const cdm::HostFile& hostFile = aHostFiles[i]; if (hostFile.file != cdm::kInvalidPlatformFile) {
std::wstring path = hostFile.file_path; auto offset = path.find(plugincontainer); if (offset != std::string::npos &&
offset == path.size() - plugincontainer.size()) { // plugin-container found, we expect 4 files in total. return4;
}
}
}
// No plugin-container, we expect 3 files in total. return3; #endif
}
CDM_API bool VerifyCdmHost_0(const cdm::HostFile* aHostFiles, uint32_t aNumFiles) { // Check that we've received the expected number of host files. bool rv = (aNumFiles == NumExpectedHostFiles(aHostFiles, aNumFiles)); // Verify that each binary is readable inside the sandbox, // and close the handle. for (uint32_t i = 0; i < aNumFiles; i++) { const cdm::HostFile& hostFile = aHostFiles[i]; if (hostFile.file != cdm::kInvalidPlatformFile) { if (!CanReadSome(hostFile.file)) {
rv = false;
}
ClosePlatformFile(hostFile.file);
} if (hostFile.sig_file != cdm::kInvalidPlatformFile) {
ClosePlatformFile(hostFile.sig_file);
}
}
sCanReadHostVerificationFiles = rv; return rv;
}
} // extern "C".
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.14 Sekunden
(vorverarbeitet am 2026-08-24)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.