Commit Diff


commit - 1a0c81fb613b80af38dbc7f37c12f42a34b363d6
commit + a678036d5fc91d90d799f3ed394f0f721d227d12
blob - 8e765c5a8d213bc5f3bc28783185c77337ca0e30
blob + a20548a36dab44bcdc56af91c0847fc938ea5df6
--- gotwebd/parse.y
+++ gotwebd/parse.y
@@ -209,6 +209,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)) {