diff options
author | Slávek Banko <[email protected]> | 2020-12-29 18:00:29 +0100 |
---|---|---|
committer | Slávek Banko <[email protected]> | 2020-12-30 09:33:52 +0100 |
commit | 9444f009b0747c017a6888b17efaf848122713a9 (patch) | |
tree | e329630e80637848ccb44762c28cbf236ec57f8e /src/libr-icons.c | |
parent | d47907f7a367cd777590309354e6333954e04d28 (diff) | |
download | libr-9444f009b0747c017a6888b17efaf848122713a9.tar.gz libr-9444f009b0747c017a6888b17efaf848122713a9.zip |
Fix setting UUID of ELF file icon.
The GUID was checked, converted to a UUID structure, but was not written
to the icon. This could cause each call to libr_icon_setuuid to store a
different UUID, making reproducible builds impossible.
Signed-off-by: Slávek Banko <[email protected]>
(cherry picked from commit 46ae2717d2b14080f41fe2ffe7c14b071e67507d)
Diffstat (limited to 'src/libr-icons.c')
-rw-r--r-- | src/libr-icons.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/libr-icons.c b/src/libr-icons.c index 18dc536..acceac8 100644 --- a/src/libr-icons.c +++ b/src/libr-icons.c @@ -542,6 +542,7 @@ EXPORT_FN int libr_icon_setuuid(libr_file *handle, char *guid) memcpy(&(icons.buffer[OFFSET_ENTRIES]), &entries, sizeof(uint32_t)); } /* Set the GUID and write the resource */ + memcpy(&(icons.buffer[OFFSET_GUID]), &id, sizeof(UUID)); if(!libr_write(handle, ICON_SECTION, icons.buffer, icons.size, LIBR_UNCOMPRESSED, LIBR_OVERWRITE)) { /* failed to write icon resource */ |