Skip to content

v2.2.29 - #249

Merged
PaulZC merged 4 commits into
mainfrom
release_candidate
Jul 15, 2026
Merged

PaulZC merged 4 commits into
mainfrom
release_candidate

Conversation

@PaulZC

@PaulZC PaulZC commented Jul 15, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

94xhn and others added 4 commits July 15, 2026 13:02
storePacket() and storeFileBytes() used a strict '>' when checking
whether a write fits in the file buffer's available space. This let
a write of exactly fileBufferSpaceAvailable() bytes succeed, which
can bring fileBufferHead back around to equal fileBufferTail. Since
head == tail is used elsewhere to mean 'buffer empty', the just
written bytes become invisible to fileBufferSpaceUsed() and are
silently lost from extractFileBufferData().

Changing both guards to '>=' reserves fileBufferSize - 1 as the
buffer's usable capacity (the standard fix for ring buffers that use
head == tail to mean empty), so a write can never exactly fill the
buffer and recreate the ambiguity.
Fix file-buffer exact-fit guard (off-by-one) to prevent silent data loss
@PaulZC
PaulZC merged commit 2b3ab66 into main Jul 15, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants