{{ message }}
Repository navigation
Commit 4e47eba
scanners: avoid transient write when sentinel already NUL.
_scan_at patched the byte at ptr[c->len] with '\0' around every
scanner invocation so that the re2c scanners (built with
yyfill:enable = 0) could use it as a stopping sentinel. In the
common case the chunk is backed by a cmark_strbuf whose data[size]
is already '\0', so the write was an idempotent mutation of shared
backing storage. Skip it when the byte is already '\0' to preserve
const-correctness and reentrancy on that path; retain the patch
fallback for chunks that are not already NUL-terminated.
Co-Authored-By: Claude <noreply@anthropic.com>1 parent 8c9dcdd commit 4e47eba
2 files changed
Lines changed: 28 additions & 6 deletions

0 commit comments