• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

nats-io / nats-server / 28497358870
83%

Build:
DEFAULT BRANCH: main
Ran 01 Jul 2026 07:14AM UTC
Jobs 1
Files 65
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

30 Jun 2026 08:35AM UTC coverage: 77.421% (+0.9%) from 76.505%
28497358870

push

github

web-flow
reject malformed replicated ack and delivered updates on decode (#8284)

decodeAckUpdate and decodeDeliveredUpdate check the varint result with
`n < 0`, which only flags a 64-bit overflow. binary.Uvarint and
binary.Varint return n == 0 when the buffer is too short to hold a full
varint, so a truncated replicated ack or delivered update from a peer
slips past the guard and decodes to zeroed fields. The caller then
applies that as a real update (UpdateDelivered / processReplicatedAck)
instead of treating the entry as corrupt.

Switch the guards to `n <= 0` so a short buffer is rejected the same way
an overflow already is. Before: a truncated entry returned a nil error
and silently advanced consumer state. After: it returns errBadAckUpdate
/ errBadDeliveredUpdate and is handled as malformed, matching
DecodeStreamState and the filestore block decoders that already use `n
<= 0`. The tradeoff is that a short entry now surfaces as a decode error
rather than being absorbed, which is the same behavior the overflow case
already had.

72914 of 94179 relevant lines covered (77.42%)

522742.46 hits per line

Coverage Regressions

Lines Coverage ∆ File
89
82.88
-0.56% src/github.com/nats-io/nats-server/server/jetstream_cluster.go
19
80.32
0.65% src/github.com/nats-io/nats-server/server/raft.go
18
87.58
0.16% src/github.com/nats-io/nats-server/server/consumer.go
17
56.68
-1.04% src/github.com/nats-io/nats-server/server/jetstream_errors_generated.go
13
74.19
-0.16% src/github.com/nats-io/nats-server/server/jetstream_api.go
8
79.08
0.65% src/github.com/nats-io/nats-server/server/filestore.go
7
86.14
0.09% src/github.com/nats-io/nats-server/server/stream.go
2
93.71
0.04% src/github.com/nats-io/nats-server/server/gateway.go
2
98.58
-1.42% src/github.com/nats-io/nats-server/server/jetstream_versioning.go
2
55.49
-1.1% src/github.com/nats-io/nats-server/server/log.go
2
72.41
0.05% src/github.com/nats-io/nats-server/server/memstore.go
2
63.56
0.55% src/github.com/nats-io/nats-server/server/opts.go
1
89.84
0.89% src/github.com/nats-io/nats-server/server/client.go
Jobs
ID Job ID Ran Files Coverage
1 28497358870.1 01 Jul 2026 07:14AM UTC 65
77.42
GitHub Action Run
Source Files on build 28497358870
  • Tree
  • List 65
  • Changed 26
  • Source Changed 1
  • Coverage Changed 26
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #28497358870
  • a0f68a74 on github
  • Prev Build on main (#28423801384)
  • Next Build on main (#28568937871)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc