From 262034b5b19398a53152f17508724fc88a9d67c7 Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Sun, 25 May 2008 12:32:14 +0200 Subject: [PATCH] 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. --- dowkd.in | 1 + 1 file changed, 1 insertion(+) 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; -- 2.11.4.GIT