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 <slavek.banko@axis.cz>
pull/6/head
Slávek Banko 3 years ago
parent ccb509e475
commit 46ae2717d2
No known key found for this signature in database
GPG Key ID: 608F5293A04BE668

@ -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 */

Loading…
Cancel
Save