git: 72c51c9bb843 - main - security/vuls: Fix build problem on i386
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 28 May 2025 11:26:33 UTC
The branch main has been updated by girgen:
URL: https://cgit.FreeBSD.org/ports/commit/?id=72c51c9bb84393c3538b58560fc0a3746bc01b0d
commit 72c51c9bb84393c3538b58560fc0a3746bc01b0d
Author: Palle Girgensohn <girgen@FreeBSD.org>
AuthorDate: 2025-05-28 11:23:42 +0000
Commit: Palle Girgensohn <girgen@FreeBSD.org>
CommitDate: 2025-05-28 11:26:26 +0000
security/vuls: Fix build problem on i386
Fix fetched from upstreams module:
https://github.com/go-gorm/gorm/commit/8c4e8e2d2a63ef019048bd988a2016948605920b
The change does not modify 64-bit built binaries, so no point in bumping
the portrevision.
---
..._gorm.io_gorm_internal_stmt_store_stmt_store.go | 29 ++++++++++++++++++++++
1 file changed, 29 insertions(+)
diff --git a/security/vuls/files/patch-vendor_gorm.io_gorm_internal_stmt_store_stmt_store.go b/security/vuls/files/patch-vendor_gorm.io_gorm_internal_stmt_store_stmt_store.go
new file mode 100644
index 000000000000..a249bd5099ae
--- /dev/null
+++ b/security/vuls/files/patch-vendor_gorm.io_gorm_internal_stmt_store_stmt_store.go
@@ -0,0 +1,29 @@
+commit 8c4e8e2d2a63ef019048bd988a2016948605920b
+Author: iTanken <23544702+iTanken@users.noreply.github.com>
+Date: Sun Apr 27 14:05:16 2025 +0800
+
+ fix: int type variable defaultMaxSize overflows in 32-bit environment (#7439)
+
+ Refs: #7435
+
+diff --git a/internal/stmt_store/stmt_store.go b/internal/stmt_store/stmt_store.go
+index 7068419..a82b2cf 100644
+--- vendor/gorm.io/gorm/internal/stmt_store/stmt_store.go
++++ vendor/gorm.io/gorm/internal/stmt_store/stmt_store.go
+@@ -3,6 +3,7 @@ package stmt_store
+ import (
+ "context"
+ "database/sql"
++ "math"
+ "sync"
+ "time"
+
+@@ -73,7 +74,7 @@ type Store interface {
+ // the cache can theoretically store as many elements as possible.
+ // (1 << 63) - 1 is the maximum value that an int64 type can represent.
+ const (
+- defaultMaxSize = (1 << 63) - 1
++ defaultMaxSize = math.MaxInt
+ // defaultTTL defines the default time-to-live (TTL) for each cache entry.
+ // When the TTL for cache entries is not specified, each cache entry will expire after 24 hours.
+ defaultTTL = time.Hour * 24