summaryrefslogtreecommitdiffstats
path: root/sbin
diff options
context:
space:
mode:
authorpjd <pjd@FreeBSD.org>2011-04-20 16:36:59 +0000
committerpjd <pjd@FreeBSD.org>2011-04-20 16:36:59 +0000
commit959bc74175cdf66a4e6fb6879889d2de1a56b89d (patch)
treeb70e574680e12dfc6103deb3f0fe5ba1162e4957 /sbin
parent488ea46b7d7c71796ada53fa9457888744b9ee6d (diff)
downloadFreeBSD-src-959bc74175cdf66a4e6fb6879889d2de1a56b89d.zip
FreeBSD-src-959bc74175cdf66a4e6fb6879889d2de1a56b89d.tar.gz
Timeout must be positive.
MFC after: 1 week
Diffstat (limited to 'sbin')
-rw-r--r--sbin/hastd/parse.y4
1 files changed, 4 insertions, 0 deletions
diff --git a/sbin/hastd/parse.y b/sbin/hastd/parse.y
index 3f34ff7..91e4870 100644
--- a/sbin/hastd/parse.y
+++ b/sbin/hastd/parse.y
@@ -461,6 +461,10 @@ compression_type:
timeout_statement: TIMEOUT NUM
{
+ if ($2 <= 0) {
+ pjdlog_error("Negative or zero timeout.");
+ return (1);
+ }
switch (depth) {
case 0:
depth0_timeout = $2;
OpenPOWER on IntegriCloud