Commit Diff


commit - a0bd573d20ed11633bbc4cc476bcfd7823f9773a
commit + 90757f0a7eedde53f109f67061bb39256412dd60
blob - 1acab5342ac9ce5a65c040435a3c5665567b1206
blob + f30b23eb629f482ab10caed66d7ca2e332d07756
--- gotwebd/parse.y
+++ gotwebd/parse.y
@@ -210,6 +210,13 @@ main		: PREFORK NUMBER {
 			gotwebd->prefork_gotwebd = $2;
 		}
 		| CHROOT STRING {
+			if (*$2 == '\0') {
+				yyerror("chroot path can't be an empty"
+				    " string");
+				free($2);
+				YYERROR;
+			}
+
 			n = strlcpy(gotwebd->httpd_chroot, $2,
 			    sizeof(gotwebd->httpd_chroot));
 			if (n >= sizeof(gotwebd->httpd_chroot)) {