commit a42b418b1416531932c59f608ef8cc9cfb442cc9 from: Stefan Sperling via: Thomas Adam date: Mon Jan 02 15:03:00 2023 UTC gotd.conf: treat empty repository names as a syntax error commit - bb45bea88220ce7474bfe455a681f00406ba0e6f commit + a42b418b1416531932c59f608ef8cc9cfb442cc9 blob - 600804ea94852ce949195c67cd44ea59c6bc7d92 blob + 04a0a05924fa027b951915a3a70ba7d6524d21c5 --- gotd/parse.y +++ gotd/parse.y @@ -670,6 +670,11 @@ conf_new_repo(const char *name) { struct gotd_repo *repo; + if (name[0] == '\0') { + fatalx("syntax error: empty repository name found in %s", + file->name); + } + if (strchr(name, '\n') != NULL) { fatalx("%s: repository names must not contain linefeeds: %s", getprogname(), name);