We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 26aaea7 commit f2865d0Copy full SHA for f2865d0
internal/indexer/indexer.go
@@ -1,4 +1,4 @@
1
-// Copyright 2024 Blink Labs Software
+// Copyright 2025 Blink Labs Software
2
//
3
// Use of this source code is governed by an MIT-style
4
// license that can be found in the LICENSE file or at
@@ -10,6 +10,7 @@ import (
10
"encoding/hex"
11
"fmt"
12
"log/slog"
13
+ "math"
14
"os"
15
"strings"
16
"time"
@@ -369,7 +370,10 @@ func (i *Indexer) handleEventOutputDns(
369
370
Rhs: string(record.Rhs),
371
}
372
if record.Ttl.HasValue() {
- tmpRecord.Ttl = int(record.Ttl.Value)
373
+ if record.Ttl.Value > math.MaxInt {
374
+ return fmt.Errorf("record ttl value out of bounds")
375
+ }
376
+ tmpRecord.Ttl = int(record.Ttl.Value) // #nosec G115
377
378
tmpRecords = append(tmpRecords, tmpRecord)
379
0 commit comments