[misc] add arbitrary buffer allocation to GetResource()

* If duplicate is TRUE and len is non-zero, then a buffer of len size,
  padded with zeroes, is allocated for the resource.
This commit is contained in:
Pete Batard 2020-02-19 12:41:13 +00:00
parent 841b79f45d
commit b8579c04da
No known key found for this signature in database
GPG key ID: 38E0CF5E69EDD671
6 changed files with 27 additions and 12 deletions

View file

@ -1856,7 +1856,7 @@ LPCDLGTEMPLATE GetDialogTemplate(int Dialog_ID)
int i;
const char thai_id[] = "th-TH";
size_t len;
DWORD size;
DWORD size = 0;
DWORD* dwBuf;
WCHAR* wBuf;
LPCDLGTEMPLATE rcTemplate = (LPCDLGTEMPLATE) GetResource(hMainInstance, MAKEINTRESOURCEA(Dialog_ID),