diff options
author | ph10 <ph10@6239d852-aaf2-0410-a92c-79f79f948069> | 2020-02-24 15:39:56 +0000 |
---|---|---|
committer | ph10 <ph10@6239d852-aaf2-0410-a92c-79f79f948069> | 2020-02-24 15:39:56 +0000 |
commit | 9af350af12899021537ce50c25ba98bdd7c1e5ee (patch) | |
tree | ca0449e427ce508d05415a7776b05688f49ae465 /testdata | |
parent | d1125270b0e74ff196824dfb2d3a4e9793e6d6d4 (diff) | |
download | pcre2-9af350af12899021537ce50c25ba98bdd7c1e5ee.tar.gz |
Fix bug in UTF-16 checker returning wrong offset for missing low surrogate.
git-svn-id: svn://vcs.exim.org/pcre2/code/trunk@1226 6239d852-aaf2-0410-a92c-79f79f948069
Diffstat (limited to 'testdata')
-rw-r--r-- | testdata/testinput12 | 6 | ||||
-rw-r--r-- | testdata/testoutput12-16 | 11 | ||||
-rw-r--r-- | testdata/testoutput12-32 | 9 | ||||
-rw-r--r-- | testdata/testoutput14-16 | 2 |
4 files changed, 26 insertions, 2 deletions
diff --git a/testdata/testinput12 b/testdata/testinput12 index 32e97b5..beaf643 100644 --- a/testdata/testinput12 +++ b/testdata/testinput12 @@ -444,6 +444,12 @@ \= Expect no match A\x{d800}B A\x{110000}B + +/aa/utf,ucp,match_invalid_utf,global + aa\x{d800}aa + +/aa/utf,ucp,match_invalid_utf,global + \x{d800}aa # ---------------------------------------------------- diff --git a/testdata/testoutput12-16 b/testdata/testoutput12-16 index b944311..6e545c3 100644 --- a/testdata/testoutput12-16 +++ b/testdata/testoutput12-16 @@ -533,7 +533,7 @@ Failed: error -26: UTF-16 error: isolated low surrogate at offset 2 XX\x{110000} ** Failed: character \x{110000} is greater than 0x10ffff and so cannot be converted to UTF-16 XX\x{d800}\x{1234} -Failed: error -25: UTF-16 error: invalid low surrogate at offset 3 +Failed: error -25: UTF-16 error: invalid low surrogate at offset 2 \= Expect no match XX\x{d800}\=offset=3 No match @@ -1576,6 +1576,15 @@ No match No match A\x{110000}B ** Failed: character \x{110000} is greater than 0x10ffff and so cannot be converted to UTF-16 + +/aa/utf,ucp,match_invalid_utf,global + aa\x{d800}aa + 0: aa + 0: aa + +/aa/utf,ucp,match_invalid_utf,global + \x{d800}aa + 0: aa # ---------------------------------------------------- diff --git a/testdata/testoutput12-32 b/testdata/testoutput12-32 index 74ccac8..1a0783a 100644 --- a/testdata/testoutput12-32 +++ b/testdata/testoutput12-32 @@ -1574,6 +1574,15 @@ No match No match A\x{110000}B No match + +/aa/utf,ucp,match_invalid_utf,global + aa\x{d800}aa + 0: aa + 0: aa + +/aa/utf,ucp,match_invalid_utf,global + \x{d800}aa + 0: aa # ---------------------------------------------------- diff --git a/testdata/testoutput14-16 b/testdata/testoutput14-16 index 2d58f1c..61541f6 100644 --- a/testdata/testoutput14-16 +++ b/testdata/testoutput14-16 @@ -33,7 +33,7 @@ Failed: error -26: UTF-16 error: isolated low surrogate at offset 2 XX\x{110000} ** Failed: character \x{110000} is greater than 0x10ffff and so cannot be converted to UTF-16 XX\x{d800}\x{1234} -Failed: error -25: UTF-16 error: invalid low surrogate at offset 3 +Failed: error -25: UTF-16 error: invalid low surrogate at offset 2 /badutf/utf X\xdf |