Branch: refs/heads/main
Revision: 7c2b001
Author: e-kayrakli
Log Message:
Merge pull request #18288 from e-kayrakli/regex-subn-null-bug
Fix a bug that's caused by null bytes in regex.subn
When replacing a substring with a null byte, we were passing the c_string
returned by the qio_regex_replace directly into string factory functions.
However, that implies using null byte as the terminator. We have to pass the
length of the buffer for correct operation.
[Trivial, not reviewed]
Test:
-
[x] standard
Modified Files:
A test/regex/nullByteBug.chpl
A test/regex/nullByteBug.good
M modules/standard/Regex.chplCompare: Comparing 36a47c045756...7c2b001c079d · chapel-lang/chapel · GitHub