Commit Diff


commit - 7272b60a19e7deee3a1808cbda935e201074c50d
commit + 1fa505c4ad80469884962571ef13853f1be8dd08
blob - 920aff4245e78df0835a5a015cdb9431a5643348
blob + 0b1c88fa2ead6580ce2ca8a27bed7a836c4e54b2
--- gotwebd/parse.y
+++ gotwebd/parse.y
@@ -387,8 +387,12 @@ serveropts1	: REPOS_PATH STRING {
 				new_srv->max_repos_display = $2;
 		}
 		| MAX_COMMITS_DISPLAY NUMBER {
-			if ($2 > 0)
-				new_srv->max_commits_display = $2;
+			if ($2 <= 1) {
+				yyerror("max_commits_display is too small:"
+				    " %lld", $2);
+				YYERROR;
+			}
+			new_srv->max_commits_display = $2;
 		}
 		;