mirror of
https://github.com/pbatard/rufus.git
synced 2025-05-20 09:55:11 -04:00
[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:
parent
841b79f45d
commit
b8579c04da
6 changed files with 27 additions and 12 deletions
|
@ -2,7 +2,7 @@
|
|||
* Rufus: The Reliable USB Formatting Utility
|
||||
* DOS boot file extraction, from the FAT12 floppy image in diskcopy.dll
|
||||
* (MS WinME DOS) or from the embedded FreeDOS resource files
|
||||
* Copyright © 2011-2017 Pete Batard <pete@akeo.ie>
|
||||
* Copyright © 2011-2020 Pete Batard <pete@akeo.ie>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -317,6 +317,7 @@ static BOOL ExtractMSDOS(const char* path)
|
|||
goto out;
|
||||
}
|
||||
|
||||
DiskImageSize = 0;
|
||||
DiskImage = (BYTE*)GetResource(hDLL, MAKEINTRESOURCEA(1), "BINFILE", "disk image", &DiskImageSize, TRUE);
|
||||
if (DiskImage == NULL)
|
||||
goto out;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue