Skip to content

Bug fixes - #15

Merged
dc42 merged 2 commits into
3.7-devfrom
3.7-ch
Nov 17, 2026
Merged

dc42 merged 2 commits into
3.7-devfrom
3.7-ch

Conversation

@chrishamm

Copy link
Copy Markdown
Collaborator

Fixes from the code review, as requested for commenting.

StringContains missed a match that started inside a partial match ("ab" in "aab") and now also returns 0 for an empty match as the contract says. SafeStrncat passed length - index to strncat, which appends the terminator after that many characters and so could write dst[length]. The other changes cover the 64-bit octal print buffer, SafeVsnprintf with a buffer of length zero and WriteLocker releasing a writer after Downgrade.

Built as part of the Mini 5+ and MB6HC firmware. Only StringContains was checked separately, against strstr on the host.

StringContains missed a match that started inside a partial match
SafeStrncat could write its terminator one byte past the buffer
64-bit octal values could underrun the print buffer
SafeVsnprintf wrote a terminator into a buffer of length zero
WriteLocker released a writer after Downgrade although it then held a read lock
@dc42
dc42 merged commit 148453a into 3.7-dev Nov 17, 2026
1 check passed
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 17, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants