commit 41a0f38597a4de668df95175a864a02c1093dc3a from: Stefan Sperling date: Sun Sep 07 18:36:25 2025 UTC clamp qs->index_page to the correct range, we want a positive int commit - adaf63907ce7d1b5dc45b6b7405087879332247f commit + 41a0f38597a4de668df95175a864a02c1093dc3a blob - 89ead404546314fa3c7d49a1fe5e7f58d495a1c5 blob + 18c5cf2aed1fa6c673ed511ce1a2fd6283a0a78a --- gotwebd/fcgi.c +++ gotwebd/fcgi.c @@ -320,15 +320,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)) >=