From f41b84eed623351ffbd9d79876fde71597b91875 Mon Sep 17 00:00:00 2001 From: Tsachi Herman <24438559+tsachiherman@users.noreply.github.com> Date: Thu, 19 Oct 2023 13:20:16 -0400 Subject: [PATCH] fix potential overflow (#1036) --- 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 e872a31c..9f37b513 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) }