commit f03e60a991b6bf54e115e3d187aede52f52ef56c from: Mark Jamsek date: Sun Nov 24 13:33:14 2024 UTC gotwebd: fix UB when path param is not in query Don't pass NULL as a *printf(3) %s conversion specifier argument. If the path parameter is not defined, return repo not found error. ok stsp@ commit - 125ca675f07f91d5b8713dbc4ba8c2ef7bf70914 commit + f03e60a991b6bf54e115e3d187aede52f52ef56c blob - cc06209b1e8c52eb8460afa45b05725c2650d9e2 blob + 8cb8b818f4c6074b02022a654a94701232e3456b --- gotwebd/gotweb.c +++ gotwebd/gotweb.c @@ -1069,6 +1069,9 @@ gotweb_load_got_path(struct repo_dir **rp, const char DIR *dt; char *dir_test; + if (dir == NULL) + return got_error(GOT_ERR_NOT_GIT_REPO); + *rp = calloc(1, sizeof(**rp)); if (*rp == NULL) return got_error_from_errno("calloc");