Skip to content

Commit

Permalink
build(deps): bump go.einride.tech/sage from 0.306.0 to 0.309.0 in /.sage
Browse files Browse the repository at this point in the history
Bumps [go.einride.tech/sage](https://github.com/einride/sage) from 0.306.0 to 0.309.0.
- [Release notes](https://github.com/einride/sage/releases)
- [Commits](einride/sage@v0.306.0...v0.309.0)

---
updated-dependencies:
- dependency-name: go.einride.tech/sage
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
  • Loading branch information
dependabot[bot] committed Sep 17, 2024
1 parent 60a4920 commit 6c0f123
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .sage/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ module sage

go 1.17

require go.einride.tech/sage v0.306.0
require go.einride.tech/sage v0.309.0
4 changes: 2 additions & 2 deletions .sage/go.sum
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
go.einride.tech/sage v0.306.0 h1:FjnGGXqA11NJnV11zYhTq+tcMN4vrqMdBeSLnwfSAs0=
go.einride.tech/sage v0.306.0/go.mod h1:EzV5uciFX7/2ho8EKB5K9JghOfXIxlzs694b+Tkl5GQ=
go.einride.tech/sage v0.309.0 h1:dDDvHDTzQPOUfLqlBotxZhf1uQzxa1Ut1sPA+ln0oUs=
go.einride.tech/sage v0.309.0/go.mod h1:EzV5uciFX7/2ho8EKB5K9JghOfXIxlzs694b+Tkl5GQ=
1 change: 0 additions & 1 deletion bpf.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ func shortMessageChannelFilter(channels ...string) []bpf.Instruction {
bpf.RetConstant{Val: lengthOfLargestUDPMessage}, // Accept instruction
)
// Start with next channel pointing to the rejection we just added
//nolint:gosec // overflow shouldn't be an issue here.
progLen := uint8(len(program))
rewrite := map[uint8]uint8{
jumpNextChannelPlaceholder: progLen - 2,
Expand Down
1 change: 0 additions & 1 deletion lcm_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,6 @@ func TestLCM_OneTransmitter_OneReceiver_ManyCompressed(t *testing.T) {
assert.NilError(t, g.Wait())
assert.Equal(t, "first", rx.Message().Channel)
assert.DeepEqual(t, []byte(strings.Repeat("foo", i)), rx.Message().Data)
//nolint:gosec // i starts at 100 so no risk for underflow.
assert.Equal(t, uint32(i-100), rx.Message().SequenceNumber)
})
}
Expand Down
5 changes: 0 additions & 5 deletions lcmlog/message.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,6 @@ func (m *Message) WriteTo(w io.Writer) (int64, error) {
func (m *Message) UnmarshalBinary(b []byte) {
m.EventNumber = binary.BigEndian.Uint64(b[indexOfEventNumber:endOfEventNumber])
timestampMicros := binary.BigEndian.Uint64(b[indexOfTimestamp:endOfTimestamp])
//nolint:gosec // false positive for the integer overflow.
m.Timestamp = time.Unix(0, (time.Duration(timestampMicros) * time.Microsecond).Nanoseconds())
channelLength := binary.BigEndian.Uint32(b[indexOfChannelLength:endOfChannelLength])
dataLength := binary.BigEndian.Uint32(b[indexOfDataLength:endOfDataLength])
Expand All @@ -122,18 +121,14 @@ func (m *Message) UnmarshalBinary(b []byte) {
// MarshalBinary will output the message this function is called on to a byte slice.
// The inverse of this function is UnmarshalBinary.
func (m *Message) MarshalBinary() []byte {
//nolint:gosec // false positive for integer overflow.
endofChannel := endOfDataLength + uint32(len(m.Channel))
//nolint:gosec // length won't be negative.
endOfData := endofChannel + uint32(len(m.Data))
b := make([]byte, endOfDataLength+len(m.Channel)+len(m.Data))
binary.BigEndian.PutUint32(b[indexOfSyncWord:endOfSyncWord], syncWord)
binary.BigEndian.PutUint64(b[indexOfEventNumber:endOfEventNumber], m.EventNumber)
timestampMicros := uint64(time.Duration(m.Timestamp.UnixNano()) / time.Microsecond)
binary.BigEndian.PutUint64(b[indexOfTimestamp:endOfTimestamp], timestampMicros)
//nolint:gosec // length won't be negative.
binary.BigEndian.PutUint32(b[indexOfChannelLength:endOfChannelLength], uint32(len(m.Channel)))
//nolint:gosec // length won't be negative.
binary.BigEndian.PutUint32(b[indexOfDataLength:endOfDataLength], uint32(len(m.Data)))
copy(b[endOfDataLength:endofChannel], m.Channel)
copy(b[endofChannel:endOfData], m.Data)
Expand Down

0 comments on commit 6c0f123

Please sign in to comment.