mirror of
https://github.com/reactos/reactos.git
synced 2025-02-22 16:36:33 +00:00
[PEFIXUP] Only recalculate the PE checksum if the image is not from a reproducible build (original checksum == 0). (#3598)
This commit is contained in:
parent
7ad33940c2
commit
88b933330d
1 changed files with 4 additions and 3 deletions
|
@ -283,10 +283,11 @@ int main(int argc, char **argv)
|
|||
|
||||
if (!result)
|
||||
{
|
||||
/* Success. Fix checksum and write to file */
|
||||
/* Success. Recalculate the checksum only if this is not a reproducible build file */
|
||||
if (nt_header->OptionalHeader.CheckSum != 0)
|
||||
fix_checksum(buffer, len, nt_header);
|
||||
|
||||
/* We could 'optimize by only writing the changed parts, but keep it simple for now */
|
||||
/* We could optimize by only writing the changed parts, but keep it simple for now */
|
||||
fseek(file, 0, SEEK_SET);
|
||||
fwrite(buffer, 1, len, file);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue