command: hashsum: md5sum reports wrong sum for the file named 4k.bin

Peter Mamonov pmamonov at gmail.com
Wed Dec 20 02:48:14 PST 2017


Hi,

The md5sum command reports wrong sum for a file named 4k.bin and, I guess, for 
other files named alike. Here are the commands to reproduce the bug:

	barebox at barebox sandbox:/ memcpy -s /dev/zero -d _4k.bin 0 0 4k
	barebox at barebox sandbox:/ md5sum _4k.bin
	620f0b67a91f7f74151bc5be745b7110  _4k.bin
	
	barebox at barebox sandbox:/ cp _4k.bin 4k.bin
	barebox at barebox sandbox:/ md5sum 4k.bin
	d41d8cd98f00b204e9800998ecf8427e  4k.bin
	
	barebox at barebox sandbox:/ cp 4k.bin __4k.bin
	barebox at barebox sandbox:/ md5sum __4k.bin 
	620f0b67a91f7f74151bc5be745b7110  __4k.bin
	
	barebox at barebox sandbox:/ version
	
	barebox 2017.12.0 #4 Wed Dec 20 12:26:57 MSK 2017
	
	barebox at barebox sandbox:/ Terminated
	
	$ dd if=/dev/zero bs=4k count=1 | md5sum
	...
	620f0b67a91f7f74151bc5be745b7110  -

Regards,
Peter



More information about the barebox mailing list