]> git.ipfire.org Git - thirdparty/public-inbox.git/commit
searchview: fix uninitialized var on bogus `o='
authorEric Wong <e@80x24.org>
Thu, 30 Oct 2025 04:26:58 +0000 (04:26 +0000)
committerEric Wong <e@80x24.org>
Fri, 31 Oct 2025 00:31:15 +0000 (00:31 +0000)
commit1b9b10d9c6e0d6f93a62a43f720a47f84b5eaec3
tree88e1d154fe0e19d3048fa43e64b4f01699815c51
parentb23590a2c6b56142ffa5a343ca1208db002e8204
searchview: fix uninitialized var on bogus `o='

When somebody enters an out-of-bounds `o=' (offset) query parameter
for a query which otherwise returns some results, we should avoid
triggering uninitialized variable warnings since we were unable
to extract min/max relevance percentages.  So just make up some
{min,max}_pct numbers for now if somebody tries that.

Aside from causing noise in stderr (often syslog), these were
otherwise harmless warning.  AFAIK, this could only be triggered
by someone entering URL parameters manually to view HTML, and
not in any generated URLs.
lib/PublicInbox/SearchView.pm