Skip to content

Commit 40d106c

Browse files
committed
Fix out of range
1 parent fc8bfea commit 40d106c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

pkg/ebpf/maps/display.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ func RestoreBytes(format DisplayFormat, value string, expectedSize uint32) ([]by
6262
return nil, fmt.Errorf("hex data is too long (%d bytes vs %d expected)", len(value)/2, expectedSize)
6363
}
6464
result := make([]byte, expectedSize)
65-
_, err := hex.Decode(result, []byte(value)[:expectedSize*2])
65+
_, err := hex.Decode(result, []byte(value))
6666
if err != nil {
6767
return nil, err
6868
}

0 commit comments

Comments
 (0)