From b6bd2a191fb4f3e43d6ec343b3d3849ab1e3d9fb Mon Sep 17 00:00:00 2001 From: Tsachi Herman <24438559+tsachiherman@users.noreply.github.com> Date: Thu, 19 Oct 2023 12:21:40 -0400 Subject: [PATCH] fix potential overflow --- cmd/soroban-rpc/internal/events/cursor.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/soroban-rpc/internal/events/cursor.go b/cmd/soroban-rpc/internal/events/cursor.go index e872a31cc..9f37b5130 100644 --- a/cmd/soroban-rpc/internal/events/cursor.go +++ b/cmd/soroban-rpc/internal/events/cursor.go @@ -69,7 +69,7 @@ func ParseCursor(input string) (Cursor, error) { parsed := toid.Parse(idInt) // Parse the second part (event order) - eventOrder, err := strconv.ParseInt(parts[1], 10, 64) //lint:ignore gomnd + eventOrder, err := strconv.ParseUint(parts[1], 10, 32) //lint:ignore gomnd if err != nil { return Cursor{}, fmt.Errorf("invalid event id %s: %w", input, err) }