PCRE2Project / pcre2

PCRE2 development is now based here.
Other
918 stars 191 forks source link

WIP: slightly improve substitutions #562

Open carenas opened 1 week ago

carenas commented 1 week ago

Avoid at least one crash introduced with recent changes to substitute code as well as clarify what the expected offset value should be when overflowing the provided buffer.

While at it, make sure that the returned string is always NUL terminated, and do some minor cleanup.

NOTE: at least truncation is wrong so posting mainly as a FYI with the hopes someone else might give it some love

zherczeg commented 6 days ago

Could you update this patch?

NWilson commented 2 days ago

Could you also split out the unrelated changes into their own PRs? It should be quick to do, and would let us merge the cosmetic changes and behaviour-altering changes in their own commits.