svn commit: r220889 - head/sbin/hastd

Pawel Jakub Dawidek pjd at FreeBSD.org
Wed Apr 20 16:36:59 UTC 2011


Author: pjd
Date: Wed Apr 20 16:36:59 2011
New Revision: 220889
URL: http://svn.freebsd.org/changeset/base/220889

Log:
  Timeout must be positive.
  
  MFC after:	1 week

Modified:
  head/sbin/hastd/parse.y

Modified: head/sbin/hastd/parse.y
==============================================================================
--- head/sbin/hastd/parse.y	Wed Apr 20 14:19:34 2011	(r220888)
+++ head/sbin/hastd/parse.y	Wed Apr 20 16:36:59 2011	(r220889)
@@ -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;


More information about the svn-src-head mailing list