mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-16 10:17:23 +00:00
ICU-8350 terminate the buffer.
X-SVN-Rev: 29989
This commit is contained in:
parent
3745b313f3
commit
61bdf314c6
1 changed files with 2 additions and 1 deletions
|
@ -2478,8 +2478,9 @@ void RegexTest::API_Replace_UTF8() {
|
|||
REGEX_ASSERT(result == &destText);
|
||||
REGEX_ASSERT_UTEXT_UTF8(str_bcbcdefg, result);
|
||||
|
||||
const char str_v[23] = { 0x54, 0x68, 0x65, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x5c, 0x24, 0x31, 0x20, 0x69, 0x73, 0x20, 0x24, 0x31, 0x2e }; /* The value of \$1 is $1. */
|
||||
const char str_v[24] = { 0x54, 0x68, 0x65, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x5c, 0x24, 0x31, 0x20, 0x69, 0x73, 0x20, 0x24, 0x31, 0x2e, 0x00 }; /* The value of \$1 is $1. */
|
||||
utext_openUTF8(&replText, str_v, -1, &status);
|
||||
REGEX_VERBOSE_TEXT(&replText);
|
||||
result = matcher2->replaceFirst(&replText, NULL, status);
|
||||
REGEX_CHECK_STATUS;
|
||||
const char str_Thevalueof1isbcdefg[] = { 0x54, 0x68, 0x65, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x24, 0x31, 0x20, 0x69, 0x73, 0x20, 0x62, 0x63, 0x2e, 0x64, 0x65, 0x66, 0x67, 0x00 }; /* The value of $1 is bc.defg */
|
||||
|
|
Loading…
Add table
Reference in a new issue