[misc] add an address resolver for internal DLL function calls

* Not sure if we'll use this to hook into FfuCaptureImage()/FfuApplyImage()/FfuMountImage()
  directly. But at least, if we ever need it, it's there...
This commit is contained in:
Pete Batard 2023-07-05 18:36:58 +01:00
parent ef345bf106
commit 0363bfe503
No known key found for this signature in database
GPG key ID: 38E0CF5E69EDD671
8 changed files with 160 additions and 20 deletions

View file

@ -915,7 +915,7 @@ static DWORD WINAPI DownloadISOThread(LPVOID param)
// thinking that Rufus is doing something malicious...
IGNORE_RETVAL(CoCreateGuid(&guid));
// coverity[fixed_size_dest]
strcpy(&pipe[9], GuidToString(&guid));
strcpy(&pipe[9], GuidToString(&guid, TRUE));
static_sprintf(icon_path, "%s%s.ico", temp_dir, APPLICATION_NAME);
ExtractAppIcon(icon_path, TRUE);
@ -973,7 +973,7 @@ static DWORD WINAPI DownloadISOThread(LPVOID param)
assert((fido_script != NULL) && (fido_len != 0));
static_sprintf(script_path, "%s%s.ps1", temp_dir, GuidToString(&guid));
static_sprintf(script_path, "%s%s.ps1", temp_dir, GuidToString(&guid, TRUE));
hFile = CreateFileU(script_path, GENERIC_WRITE, FILE_SHARE_READ, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_READONLY, NULL);
if (hFile == INVALID_HANDLE_VALUE) {
uprintf("Unable to create download script '%s': %s", script_path, WindowsErrorString());