Skip to content

DUNE/Utils/String: fix rightTrimInPlace underflow on empty/all-ws input#291

Open
krisgry wants to merge 1 commit into
LSTS:masterfrom
krisgry:feature/fix_rightTrimInPlace
Open

DUNE/Utils/String: fix rightTrimInPlace underflow on empty/all-ws input#291
krisgry wants to merge 1 commit into
LSTS:masterfrom
krisgry:feature/fix_rightTrimInPlace

Conversation

@krisgry
Copy link
Copy Markdown
Contributor

@krisgry krisgry commented May 15, 2026

See #290

Empty strings made `r = str - 1` and the loop then read one byte before
the buffer; all-whitespace strings walked off the front the same way.
Caught by ASan via Parsers/Config::parseFile when getOptionAndValue
returned rv==2 (key with no value) and arg was the empty string.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
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.

1 participant