diff --git a/lib/new_server_html.c b/lib/new_server_html.c index 722dbff6a..edcebb29b 100644 --- a/lib/new_server_html.c +++ b/lib/new_server_html.c @@ -14007,7 +14007,7 @@ unpriv_submit_run( errno = 0; char *ep = NULL; long v = strtol(s, &ep, 10); - if (!errno && !*ep && ep != (const char *) s && v > 0 && v < cs->max_prob && cs->probs[v]) { + if (!errno && !*ep && ep != (const char *) s && v > 0 && v <= cs->max_prob && cs->probs[v]) { prob_id = v; prob = cs->probs[prob_id]; } diff --git a/lib/prepare.c b/lib/prepare.c index d838f0b21..a2ef9e77e 100644 --- a/lib/prepare.c +++ b/lib/prepare.c @@ -7373,6 +7373,7 @@ compile_servers_config_free(struct compile_server_configs *cscs) xfree(csc->id); xfree(csc->langs); } + free(cscs->v); memset(cscs, 0xff, sizeof(*cscs)); }