From 2858e24254f791ff33c82a4d3dfb29496ac86df2 Mon Sep 17 00:00:00 2001 From: Philip Laine Date: Mon, 1 Apr 2024 22:29:12 +0200 Subject: [PATCH] Fix int overflow for ARM builds --- CHANGELOG.md | 1 + pkg/throttle/byterate.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5e0d4a15..662fa032 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -57,6 +57,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed - [#396](https://github.com/spegel-org/spegel/pull/396) Fix missing metrics when registering. +- [#408](https://github.com/spegel-org/spegel/pull/408) Fix int overflow for ARM builds. ### Security diff --git a/pkg/throttle/byterate.go b/pkg/throttle/byterate.go index ebaa9662..37abb938 100644 --- a/pkg/throttle/byterate.go +++ b/pkg/throttle/byterate.go @@ -8,7 +8,7 @@ import ( var unmarshalRegex = regexp.MustCompile(`^(\d+)\s?([KMGT]?Bps)$`) -type Byterate int +type Byterate int64 const ( Bps Byterate = 1