commit a45b8b1f203390cf8f7fffbc9096d945a074b0fa from: Stefan Sperling via: Thomas Adam date: Mon Sep 08 16:29:32 2025 UTC clamp qs->index_page to the correct range, we want a positive int commit - af87ad5da4ea35037472a4318fbeb50629df3662 commit + a45b8b1f203390cf8f7fffbc9096d945a074b0fa blob - 047e4cc8df0ffc329f48d4e74bbc22e01fd45c3c blob + 1633bb29acf345b9f300dcbd48c1555b5a8d35b1 --- gotwebd/fcgi.c +++ gotwebd/fcgi.c @@ -322,15 +322,12 @@ assign_querystring(struct querystring *qs, char *key, case INDEX_PAGE: if (*value == '\0') break; - qs->index_page = strtonum(value, INT64_MIN, - INT64_MAX, &errstr); + qs->index_page = strtonum(value, 0, INT_MAX, &errstr); if (errstr) { error = got_error_from_errno3(__func__, "strtonum", errstr); goto done; } - if (qs->index_page < 0) - qs->index_page = 0; break; case PATH: if (strlcpy(qs->path, value, sizeof(qs->path)) >=