server: prevent out of bounds index at end of processing

This commit is contained in:
Bill Thiede 2025-04-24 08:56:19 -07:00
parent f12979c0be
commit 1eb498712b

View File

@ -977,6 +977,7 @@ pub async fn label_unprocessed(
info!("Loaded {} rules", rules.len());
let ids = if let Some(limit) = limit {
let limit = limit.max(ids.len());
&ids[..limit]
} else {
&ids[..]