Skip to content

Commit 26aa505

Browse files
committed
triedb/pathdb: fill more chars
1 parent e71031e commit 26aa505

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

triedb/pathdb/history_trienode_test.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -694,7 +694,10 @@ func TestDecodeSingleCorruptedData(t *testing.T) {
694694
// Test with corrupted varint in key section
695695
corrupted := make([]byte, len(keySection))
696696
copy(corrupted, keySection)
697-
corrupted[5] = 0xFF // Corrupt varint
697+
// Fill first 10 bytes with 0xFF to create a varint overflow (>64 bits)
698+
for i := range 10 {
699+
corrupted[i] = 0xFF
700+
}
698701
_, err = decodeSingle(corrupted, nil)
699702
if err == nil {
700703
t.Fatal("Expected error for corrupted varint")

0 commit comments

Comments
 (0)