diff options
author | ph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15> | 2012-01-11 16:07:32 +0000 |
---|---|---|
committer | ph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15> | 2012-01-11 16:07:32 +0000 |
commit | 47302d0694260f43ec9ecfd0da18a98683f47afe (patch) | |
tree | 8f056ec4e8381b9a825118a91c392a90348fd807 | |
parent | 1afb8c32435f34825d1cc046fa9c742c24b453ad (diff) | |
download | pcre-47302d0694260f43ec9ecfd0da18a98683f47afe.tar.gz |
Diagnose more than 8 hex digits in \x{...} in pcretest data lines.
git-svn-id: svn://vcs.exim.org/pcre/code/trunk@862 2f5784b3-3f2a-0410-8824-cb99058d5e15
-rw-r--r-- | pcretest.c | 11 |
1 files changed, 8 insertions, 3 deletions
@@ -2104,9 +2104,9 @@ printf("This version of pcretest is not linked with readline().\n"); #endif printf("\nOptions:\n"); #ifdef SUPPORT_PCRE16 -printf(" -16 use 16-bit interface\n"); +printf(" -16 use the 16-bit library\n"); #endif -printf(" -b show compiled code (bytecode)\n"); +printf(" -b show compiled code\n"); printf(" -C show PCRE compile-time options and exit\n"); printf(" -C arg show a specific compile-time option\n"); printf(" and exit with its value. The arg can be:\n"); @@ -3464,7 +3464,12 @@ while (!done) least one MacOS environment. */ for (pt++; isxdigit(*pt); pt++) - c = c * 16 + tolower(*pt) - ((isdigit(*pt))? '0' : 'a' - 10); + { + if (++i == 9) + fprintf(outfile, "** Too many hex digits in \\x{...} item; " + "using only the first eight.\n"); + else c = c * 16 + tolower(*pt) - ((isdigit(*pt))? '0' : 'a' - 10); + } if (*pt == '}') { p = pt + 1; |