diff --git a/sbin/md5/md5.c b/sbin/md5/md5.c --- a/sbin/md5/md5.c +++ b/sbin/md5/md5.c @@ -734,7 +734,7 @@ break; } } - if (len < 0) { + if (ferror(f)) { alg->End(&context, buf); return (NULL); }