From 46ae2717d2b14080f41fe2ffe7c14b071e67507d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sl=C3=A1vek=20Banko?= Date: Tue, 29 Dec 2020 18:00:29 +0100 Subject: [PATCH] Fix setting UUID of ELF file icon. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- src/libr-icons.c | 1 + 1 file changed, 1 insertion(+) 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 */