MD5 hash is incorrect for files over 4GB
Original Reporter info from Mantis: jaden
-
Reporter name: Dan Hersam
Original Reporter info from Mantis: jaden
- Reporter name: Dan Hersam
Description:
The MD5 sum is incorrect for large files (> 4GB) with Lazarus 0.9.30 / FPC 2.4.2 using the md5 unit. The problem exists in 2.4.3 and the 2.5.x series as well.
The issue was reported in bug #9903 (closed) and the patch in that bug solves the issue. I applied the patch to my local 2.4.2 md5.pp, rebuilt and the MD5 sum was correct.
Steps to reproduce:
Calculate the MD5 sum of a file over 4GB in size.
Additional information:
program project1;
uses
md5;
begin
writeln(ParamStr(1));
write(MD5Print(MD5File(ParamStr(1))));
ReadLn;
end.
Mantis conversion info:
- Mantis ID: 19366
- Version: 2.4.3
- Fixed in version: 2.6.0
- Fixed in revision: 17523 (#b8ff20ae)