Zero uninitialized icon group data for reproducible builds (bug #1230)
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@7104 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
9b5d7b9dfd
commit
8016f559ac
2 changed files with 6 additions and 3 deletions
|
@ -272,10 +272,11 @@ static IconPairs get_icon_order(IconGroup icon1, IconGroup icon2)
|
|||
#define destroy_icon_group(p) ( delete [] (p) )
|
||||
static LPBYTE generate_icon_group(IconGroup icon, IconPairs order, bool first)
|
||||
{
|
||||
LPBYTE group = new BYTE[
|
||||
size_t groupsize =
|
||||
sizeof(IconGroupHeader) // header
|
||||
+ order.size() * SIZEOF_RSRC_ICON_GROUP_ENTRY // entries
|
||||
];
|
||||
+ order.size() * SIZEOF_RSRC_ICON_GROUP_ENTRY; // entries
|
||||
LPBYTE group = new BYTE[groupsize];
|
||||
memset(group, 0, groupsize); // Reproducible builds (bug #1230)
|
||||
|
||||
IconGroupHeader* header = (IconGroupHeader*) group;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue