summaryrefslogtreecommitdiff
path: root/pcre_compile.c
diff options
context:
space:
mode:
authorph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>2014-05-27 18:24:42 +0000
committerph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>2014-05-27 18:24:42 +0000
commit7535acc4e3072709aacf5179e8e8e14200da4a17 (patch)
treedefba92119266e297d36c9eebb62b09611d97d36 /pcre_compile.c
parentb653a4d00e6628810fe80cf6b895c78ea7ac0da0 (diff)
downloadpcre-7535acc4e3072709aacf5179e8e8e14200da4a17.tar.gz
Give error for \x{} and \o{}.
git-svn-id: svn://vcs.exim.org/pcre/code/trunk@1481 2f5784b3-3f2a-0410-8824-cb99058d5e15
Diffstat (limited to 'pcre_compile.c')
-rw-r--r--pcre_compile.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/pcre_compile.c b/pcre_compile.c
index 5368e38..1234db0 100644
--- a/pcre_compile.c
+++ b/pcre_compile.c
@@ -549,6 +549,7 @@ static const char error_texts[] =
"group name must start with a non-digit\0"
/* 85 */
"parentheses are too deeply nested (stack check)\0"
+ "digits missing in \\x{} or \\o{}\0"
;
/* Table to identify digits and hex digits. This is used when compiling
@@ -1259,6 +1260,7 @@ else
case CHAR_o:
if (ptr[1] != CHAR_LEFT_CURLY_BRACKET) *errorcodeptr = ERR81; else
+ if (ptr[2] == CHAR_RIGHT_CURLY_BRACKET) *errorcodeptr = ERR86; else
{
ptr += 2;
c = 0;
@@ -1328,6 +1330,11 @@ else
if (ptr[1] == CHAR_LEFT_CURLY_BRACKET)
{
ptr += 2;
+ if (*ptr == CHAR_RIGHT_CURLY_BRACKET)
+ {
+ *errorcodeptr = ERR86;
+ break;
+ }
c = 0;
overflow = FALSE;
while (MAX_255(*ptr) && (digitab[*ptr] & ctype_xdigit) != 0)