Commit Diff


commit - 5144d22b0c3bcf6611cc36e93a3a859fcc521277
commit + f4425f95a55d6c26f06ecef7b3b8aa6a4a4247de
blob - bd616e146ccf4605ac53053dafa9b17cc39b8b86
blob + f850d52bdb09788ea17c47cf4efaba216c389919
--- gotwebd/parse.y
+++ gotwebd/parse.y
@@ -386,8 +386,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;
 		}
 		;