summaryrefslogtreecommitdiff
path: root/ext/fileinfo/libmagic
diff options
context:
space:
mode:
authorOndřej Surý <ondrej@sury.org>2012-05-31 10:55:48 +0200
committerOndřej Surý <ondrej@sury.org>2012-05-31 10:55:48 +0200
commit90ceaa9e92fadfef4c21ec0f76063c4387beb561 (patch)
tree42c54fe576b4513fa12eb949ce67bda472411abc /ext/fileinfo/libmagic
parent01c525f668ecff08bea21c4ff22745b8f77e8c3a (diff)
downloadphp-90ceaa9e92fadfef4c21ec0f76063c4387beb561.tar.gz
Imported Upstream version 5.4.4~rc2upstream/5.4.4_rc2
Diffstat (limited to 'ext/fileinfo/libmagic')
-rw-r--r--ext/fileinfo/libmagic/softmagic.c25
1 files changed, 1 insertions, 24 deletions
diff --git a/ext/fileinfo/libmagic/softmagic.c b/ext/fileinfo/libmagic/softmagic.c
index 648f64169..f9c2836dd 100644
--- a/ext/fileinfo/libmagic/softmagic.c
+++ b/ext/fileinfo/libmagic/softmagic.c
@@ -1654,29 +1654,6 @@ convert_libmagic_pattern(zval *pattern, int options)
for (i=0; i<Z_STRLEN_P(pattern); i++, j++) {
switch (Z_STRVAL_P(pattern)[i]) {
- case '?':
- t[j] = '.';
- break;
- case '*':
- t[j++] = '.';
- t[j] = '*';
- break;
- case '.':
- t[j++] = '\\';
- t[j] = '.';
- break;
- case '\\':
- t[j++] = '\\';
- t[j] = '\\';
- break;
- case '(':
- t[j++] = '\\';
- t[j] = '(';
- break;
- case ')':
- t[j++] = '\\';
- t[j] = ')';
- break;
case '~':
t[j++] = '\\';
t[j] = '~';
@@ -1873,7 +1850,7 @@ magiccheck(struct magic_set *ms, struct magic *m)
convert_libmagic_pattern(pattern, options);
- l = 0;
+ l = v = 0;
#if (PHP_MAJOR_VERSION < 6)
if ((pce = pcre_get_compiled_regex_cache(Z_STRVAL_P(pattern), Z_STRLEN_P(pattern) TSRMLS_CC)) == NULL) {
#else