Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions store/list_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,7 @@ func encodeSortableInt64(dst []byte, seq int64) {
if len(dst) < sortableInt64Bytes {
return
}
buf := bytes.NewBuffer(dst[:0])
// binary.Write cannot fail here: the payload is a fixed-size int64 and the
// destination is an in-memory bytes.Buffer.
_ = binary.Write(buf, binary.BigEndian, seq^math.MinInt64)
binary.BigEndian.PutUint64(dst, uint64(seq^math.MinInt64))
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [golangci] reported by reviewdog 🐶
G115: integer overflow conversion int64 -> uint64 (gosec)

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot

[store/list_helpers.go](https://github.com/bootjp/elastickv/pull/346/files/2d154bbf6fbfe55bc48c7b9aefde5d9fcbe72a8a#diff-715a1b973fd34b80452d5d8c2d31d72ddb3d181d329a8b15ae900ecb0d8f8f10)
	// binary.Write cannot fail here: the payload is a fixed-size int64 and the
	// destination is an in-memory bytes.Buffer.
	_ = binary.Write(buf, binary.BigEndian, seq^math.MinInt64)
	binary.BigEndian.PutUint64(dst, uint64(seq^math.MinInt64))
@[github-actions](https://github.com/apps/github-actions)
github-actions bot
[1 minute ago](https://github.com/bootjp/elastickv/pull/346#discussion_r2932213358)
🚫 [golangci] reported by [reviewdog](https://github.com/reviewdog/reviewdog) 🐶
G115: integer overflow conversion int64 -> uint64 (gosec)

}

// IsListMetaKey Exported helpers for other packages (e.g., Redis adapter).
Expand Down
Loading