Skip to content

honor length in valueToQuotedString to avoid buffer over-read#1701

Merged
baylesj merged 1 commit into
open-source-parsers:masterfrom
SABITHSAHEB:valueToQuotedString-length
Jul 1, 2026
Merged

honor length in valueToQuotedString to avoid buffer over-read#1701
baylesj merged 1 commit into
open-source-parsers:masterfrom
SABITHSAHEB:valueToQuotedString-length

Conversation

@SABITHSAHEB

Copy link
Copy Markdown
Contributor

the fast path in valueToQuotedStringN appended value as a NUL-terminated C-string, ignoring the length argument, so the public valueToQuotedString(value, length) reads past a buffer that is not NUL-terminated at length; build the quoted result from exactly length bytes instead.

@baylesj baylesj merged commit affc500 into open-source-parsers:master Jul 1, 2026
25 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