Skip to content

Commit

Permalink
fix bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
blackav committed Oct 31, 2024
1 parent 5a980e9 commit df3b904
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/new_server_html.c
Original file line number Diff line number Diff line change
Expand Up @@ -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];
}
Expand Down
1 change: 1 addition & 0 deletions lib/prepare.c
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}

Expand Down

0 comments on commit df3b904

Please sign in to comment.