diff options
author | 2014-09-01 10:41:55 +0000 | |
---|---|---|
committer | 2014-09-01 10:41:55 +0000 | |
commit | 215a938d38c998474a6effa29f2fc34a1473c7e2 (patch) | |
tree | d681669a021d91261b22602e7f0759bcc3b1ee72 | |
parent | Replace the code to get the FastCGI Status header with a proper way to (diff) | |
download | wireguard-openbsd-215a938d38c998474a6effa29f2fc34a1473c7e2.tar.xz wireguard-openbsd-215a938d38c998474a6effa29f2fc34a1473c7e2.zip |
be a wee bit more paranoid about file sizes.
-rw-r--r-- | usr.sbin/pkg_add/OpenBSD/ArcCheck.pm | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/ArcCheck.pm b/usr.sbin/pkg_add/OpenBSD/ArcCheck.pm index 631ad74403a..5e49e349075 100644 --- a/usr.sbin/pkg_add/OpenBSD/ArcCheck.pm +++ b/usr.sbin/pkg_add/OpenBSD/ArcCheck.pm @@ -1,5 +1,5 @@ # ex:ts=8 sw=4: -# $OpenBSD: ArcCheck.pm,v 1.26 2014/08/10 10:01:03 espie Exp $ +# $OpenBSD: ArcCheck.pm,v 1.27 2014/09/01 10:41:55 espie Exp $ # # Copyright (c) 2005-2006 Marc Espie <espie@openbsd.org> # @@ -82,6 +82,17 @@ sub verify_modes $result = 0; } } + if ($o->isFile) { + if (!defined $item->{size}) { + $o->errsay("Error: file #1 does not have recorded size", + $item->fullname); + $result = 0; + } elsif ($item->{size} != $o->{size}) { + $o->errsay("Error: size does not match for #1", + $item->fullname); + $result = 0; + } + } return $result; } |