diff options
author | ph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15> | 2017-02-22 17:37:47 +0000 |
---|---|---|
committer | ph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15> | 2017-02-22 17:37:47 +0000 |
commit | 686660568dde71f9a7f8791cbb8a77702b3ea820 (patch) | |
tree | d5d152c65b3dcc61933514aeb54082c80e8aa058 | |
parent | 7204e99eb2643d5acca173279166b872bccbcb31 (diff) | |
download | pcre-686660568dde71f9a7f8791cbb8a77702b3ea820.tar.gz |
Check character < 256 for isprint() in pcretest.
git-svn-id: svn://vcs.exim.org/pcre/code/trunk@1685 2f5784b3-3f2a-0410-8824-cb99058d5e15
-rw-r--r-- | ChangeLog | 2 | ||||
-rw-r--r-- | pcretest.c | 2 | ||||
-rw-r--r-- | testdata/testinput15 | 3 | ||||
-rw-r--r-- | testdata/testoutput15 | 5 |
4 files changed, 11 insertions, 1 deletions
@@ -23,6 +23,8 @@ following '+' or '?' (example: /X+(?#comment)?Y/. 5. Avoid use of a potentially overflowing buffer in pcregrep (patch by Petr Pisar). +6. Check for values < 256 when calling isprint() in pcretest. + Version 8.40 11-January-2017 ---------------------------- @@ -177,7 +177,7 @@ that differ in their output from isprint() even in the "C" locale. */ #define PRINTABLE(c) ((c) >= 32 && (c) < 127) #endif -#define PRINTOK(c) (locale_set? isprint(c) : PRINTABLE(c)) +#define PRINTOK(c) (locale_set? (((c) < 256) && isprint(c)) : PRINTABLE(c)) /* Posix support is disabled in 16 or 32 bit only mode. */ #if !defined SUPPORT_PCRE8 && !defined NOPOSIX diff --git a/testdata/testinput15 b/testdata/testinput15 index 83e2677..c065105 100644 --- a/testdata/testinput15 +++ b/testdata/testinput15 @@ -363,4 +363,7 @@ correctly, but that messes up comparisons). --/ /abc/89 +//8+L + \xf1\xad\xae\xae + /-- End of testinput15 --/ diff --git a/testdata/testoutput15 b/testdata/testoutput15 index bad2807..e4e123c 100644 --- a/testdata/testoutput15 +++ b/testdata/testoutput15 @@ -1136,4 +1136,9 @@ Failed: setting UTF is disabled by the application at offset 0 /abc/89 Failed: setting UTF is disabled by the application at offset 0 +//8+L + \xf1\xad\xae\xae + 0: + 0+ \x{6dbae} + /-- End of testinput15 --/ |