summaryrefslogtreecommitdiff
path: root/ext/pcre/pcrelib/pcreposix.c
diff options
context:
space:
mode:
authorULF WENDEL <uw@php.net>2012-10-22 13:38:02 +0200
committerULF WENDEL <uw@php.net>2012-10-22 13:38:02 +0200
commit77fd708a0b81bf6dfcfce6aba24eaa606b97f630 (patch)
tree08ac6b2b913d20b60c18909986d1106010b538cb /ext/pcre/pcrelib/pcreposix.c
parentc64ff20836173fc35a22092b9e586f80ac722e22 (diff)
parent7d59b2264e4ea75c34c86df756a2c2795b94753f (diff)
downloadphp-git-77fd708a0b81bf6dfcfce6aba24eaa606b97f630.tar.gz
Merge branch 'PHP-5.4' of git.php.net:php-src into PHP-5.4
* 'PHP-5.4' of git.php.net:php-src: (22 commits) Re-fixed bug #60901 (Improve "tail" syntax for AIX installation) update NEWS updated NEWS Fixed bug #63284 PCRE upgrade to 8.31 preg indenpent test script for #63055 Update libmagic.patch Add fix & missing fix Add fix & missing fix Fixed bug #63307 (Unused variable in oci8.c) Fixed bug #63265 (Add ORA-00028 to the PHP_OCI_HANDLE_ERROR macro) - Updated to version 2012.7 (2012g) SUpport newer bisons. Merge the fix for #61964 to 5.3, which will fix #63304 indent better fix for #63055 Fixed bug #63055 (Segfault in zend_gc with SF2 testsuite) I forgot that inconsistent is only avaliable in debug mode Add comments Fixed bug #63055 (Segfault in zend_gc with SF2 testsuite) PHP 5.3.18 NEWS ...
Diffstat (limited to 'ext/pcre/pcrelib/pcreposix.c')
-rw-r--r--ext/pcre/pcrelib/pcreposix.c20
1 files changed, 16 insertions, 4 deletions
diff --git a/ext/pcre/pcrelib/pcreposix.c b/ext/pcre/pcrelib/pcreposix.c
index ec2517c87a..d45a15fc65 100644
--- a/ext/pcre/pcrelib/pcreposix.c
+++ b/ext/pcre/pcrelib/pcreposix.c
@@ -6,7 +6,7 @@
and semantics are as close as possible to those of the Perl 5 language.
Written by Philip Hazel
- Copyright (c) 1997-2010 University of Cambridge
+ Copyright (c) 1997-2012 University of Cambridge
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
@@ -150,6 +150,16 @@ static const int eint[] = {
REG_BADPAT, /* (*MARK) must have an argument */
REG_INVARG, /* this version of PCRE is not compiled with PCRE_UCP support */
REG_BADPAT, /* \c must be followed by an ASCII character */
+ REG_BADPAT, /* \k is not followed by a braced, angle-bracketed, or quoted name */
+ /* 70 */
+ REG_BADPAT, /* internal error: unknown opcode in find_fixedlength() */
+ REG_BADPAT, /* \N is not supported in a class */
+ REG_BADPAT, /* too many forward references */
+ REG_BADPAT, /* disallowed UTF-8/16 code point (>= 0xd800 && <= 0xdfff) */
+ REG_BADPAT, /* invalid UTF-16 string (should not occur) */
+ /* 75 */
+ REG_BADPAT, /* overlong MARK name */
+ REG_BADPAT /* character value in \u.... sequence is too large */
};
/* Table of texts corresponding to POSIX error codes */
@@ -220,7 +230,7 @@ return length + addlength;
PCREPOSIX_EXP_DEFN void PCRE_CALL_CONVENTION
regfree(regex_t *preg)
{
-(pcre_free)(preg->re_pcre);
+(PUBL(free))(preg->re_pcre);
}
@@ -265,11 +275,12 @@ should not happen, but we all make mistakes), return REG_BADPAT. */
if (preg->re_pcre == NULL)
{
- return (errorcode < sizeof(eint)/sizeof(const int))?
+ return (errorcode < (int)(sizeof(eint)/sizeof(const int)))?
eint[errorcode] : REG_BADPAT;
}
-preg->re_nsub = pcre_info((const pcre *)preg->re_pcre, NULL, NULL);
+(void)pcre_fullinfo((const pcre *)preg->re_pcre, NULL, PCRE_INFO_CAPTURECOUNT,
+ &(preg->re_nsub));
return 0;
}
@@ -395,6 +406,7 @@ switch(rc)
case PCRE_ERROR_MATCHLIMIT: return REG_ESPACE;
case PCRE_ERROR_BADUTF8: return REG_INVARG;
case PCRE_ERROR_BADUTF8_OFFSET: return REG_INVARG;
+ case PCRE_ERROR_BADMODE: return REG_INVARG;
default: return REG_ASSERT;
}
}