From: Florian Weimer Date: Sun, 25 May 2008 10:32:14 +0000 (+0200) Subject: Add sanity check for wrong uses of check_hash X-Git-Url: https://repo.or.cz/w/dowkd.git/commitdiff_plain/262034b5b19398a53152f17508724fc88a9d67c7 Add sanity check for wrong uses of check_hash This catches bugs in the script which might lead to false positives. It's a purely defensive change, no such bugs are currently known. --- diff --git a/dowkd.in b/dowkd.in index d9f2f30..c544af6 100644 --- a/dowkd.in +++ b/dowkd.in @@ -171,6 +171,7 @@ sub print_stats () { sub check_hash ($$;$) { my ($name, $hash, $descr) = @_; + $hash && length($hash) == 16 or die "wrong hash size " . length($hash); ++$keys_found; if (exists $db{$hash}) { ++$keys_vulnerable;