From 98ff65045e7b6f6cda3bec644b5da4fd61bdf57a Mon Sep 17 00:00:00 2001 From: Mounir IDRASSI Date: Wed, 2 May 2018 19:59:50 +0200 Subject: Windows: Support machines without "EFI\Boot" folder for EFI system encryption (e.g. Windows LTSB). Compatibility enhancements for EFI system encryption. --- src/Common/Dlgcode.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'src/Common/Dlgcode.c') diff --git a/src/Common/Dlgcode.c b/src/Common/Dlgcode.c index 00e1558f..7d2fffba 100644 --- a/src/Common/Dlgcode.c +++ b/src/Common/Dlgcode.c @@ -13643,3 +13643,22 @@ BOOL GetSetupconfigLocation (wchar_t* path, DWORD cchSize) return bResult; } + +BOOL BufferHasPattern (const unsigned char* buffer, size_t bufferLen, const void* pattern, size_t patternLen) +{ + BOOL bRet = FALSE; + if (patternLen <= bufferLen) + { + size_t i; + for (i = 0; i <= (bufferLen - patternLen); ++i) + { + if (memcmp (&buffer[i], pattern, patternLen) == 0) + { + bRet = TRUE; + break; + } + } + } + + return bRet; +} -- cgit v1.2.3