mirror of
https://github.com/pbatard/rufus.git
synced 2025-05-23 11:17:03 -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 @@
|
|||
*
|
||||
* Copyright 2003 Lars Munch Christensen - All Rights Reserved
|
||||
* Copyright 1998-2008 H. Peter Anvin - All Rights Reserved
|
||||
* Copyright 2012-2018 Pete Batard
|
||||
* Copyright 2012-2020 Pete Batard
|
||||
*
|
||||
* Based on the Linux installer program for SYSLINUX by H. Peter Anvin
|
||||
*
|
||||
|
@ -185,6 +185,7 @@ BOOL InstallSyslinux(DWORD drive_index, char drive_letter, int file_system)
|
|||
} else {
|
||||
for (i=0; i<2; i++) {
|
||||
static_sprintf(tmp, "%s.%s", ldlinux, ldlinux_ext[i]);
|
||||
syslinux_ldlinux_len[i] = 0;
|
||||
syslinux_ldlinux[i] = GetResource(hMainInstance, resource[use_v5?1:0][i],
|
||||
_RT_RCDATA, tmp, &syslinux_ldlinux_len[i], TRUE);
|
||||
if (syslinux_ldlinux[i] == NULL)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue