From 03b1bbc38200539ab5b474134dd6612916154526 Mon Sep 17 00:00:00 2001 From: Drew Nutter Date: Wed, 12 Jun 2024 09:17:33 -0400 Subject: [PATCH] fix(accountsdb): integer overflow when slot = 0 --- src/accountsdb/snapshots.zig | 1 + 1 file changed, 1 insertion(+) diff --git a/src/accountsdb/snapshots.zig b/src/accountsdb/snapshots.zig index ba9015361..d172c25d7 100644 --- a/src/accountsdb/snapshots.zig +++ b/src/accountsdb/snapshots.zig @@ -725,6 +725,7 @@ pub const StatusCache = struct { return error.SlotNotFoundInStatusCache; } } + if (slot == 0) break; slot -= 1; } }