#986136 perl: shasum treats read errors like end of file

Package:
perl
Source:
perl
Description:
Larry Wall's Practical Extraction and Report Language
Submitter:
Stefan Arnold
Date:
2021-03-30 20:51:07 UTC
Severity:
normal
#986136#5
Date:
2021-03-30 09:43:43 UTC
From:
To:
I noticed his while testing with an filesystem that should give "read error" at
a certain point which did not happen but instead gives a hash output. The
easiest way to reproduce is shasuming a folder:

strace -e trace=read shasum 0</tmp
...
read(0, 0x56421603f620, 8192)           = -1 EISDIR (Ist ein Verzeichnis)
da39a3ee5e6b4b0d3255bfef95601890afd80709  -
+++ exited with 0 +++


Read gives a read error but shasum does not pass it.

#986136#10
Date:
2021-03-30 15:08:21 UTC
From:
To:
Control: clone -1 libdigest-sha-perl 6.02-1

Thanks for your bug report.

This seems to happen in Digest::SHA, but I leave the detailed
investigation to someone faster :)

I note that both /usr/bin/shasum and Digest::SHA are in both src:perl
and libdigest-sha-perl, hence cloning the bug.


Cheers,
gregor