| 1 |
From: Reinhard Tartler <[email protected]> |
| 2 |
Date: Thu, 26 Dec 2024 07:17:09 -0500 |
| 3 |
Subject: Fix overflow on 32-bit architectures |
| 4 |
|
| 5 |
On 32-bit architectures, math.MaxInt64 overflows int in VerifyOptions.MaxSignatureAttempts. |
| 6 |
Use math.MaxInt instead. |
| 7 |
|
| 8 |
Origin: upstream, https://github.com/notaryproject/notation-go/commit/a48f22835cb593d4a8ab6032f141a64de01e278d |
| 9 |
Bug: https://github.com/notaryproject/notation-go/pull/500 |
| 10 |
Forwarded: https://github.com/notaryproject/notation-go/pull/563 |
| 11 |
Applied-Upstream: 1.3.0, commit:a48f22835cb593d4a8ab6032f141a64de01e278d |
| 12 |
Last-Update: 2026-09-25 |
| 13 |
--- |
| 14 |
notation_test.go | 2 +- |
| 15 |
1 file changed, 1 insertion(+), 1 deletion(-) |
| 16 |
|
| 17 |
diff --git a/notation_test.go b/notation_test.go |
| 18 |
index cae65c5..4ce29bc 100644 |
| 19 |
--- a/notation_test.go |
| 20 |
+++ b/notation_test.go |
| 21 |
@@ -586,7 +586,7 @@ func TestLocalContent(t *testing.T) { |
| 22 |
// verify the artifact |
| 23 |
verifyOpts := VerifyOptions{ |
| 24 |
ArtifactReference: artifactReference, |
| 25 |
- MaxSignatureAttempts: math.MaxInt64, |
| 26 |
+ MaxSignatureAttempts: math.MaxInt, |
| 27 |
} |
| 28 |
policyDocument := dummyPolicyDocument() |
| 29 |
verifier := dummyVerifier{&policyDocument, mock.PluginManager{}, false, *trustpolicy.LevelStrict, false} |