com php-src: Merge branch 'PHP-5.5' into PHP-5.6: ext/fileinfo/ data_file.c ext/fileinfo/libmagic/softmagic.c ext/fil einfo/magicdata.patch
ext/mysqlnd/mysqlnd_ps.c ext/st andard/info.c
| From: | Andrey Hristov | Date: | Wed, 06 Aug 2014 13:25:12 +0000 |
| Subject: | com php-src: Merge branch 'PHP-5.5' into PHP-5.6: ext/fileinfo/ data_file.c ext/fileinfo/libmagic/softmagic.c ext/fil einfo/magicdata.patch ext/mysqlnd/mysqlnd_ps.c ext/st andard/info.c |
||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-79766@lists.php.net to get a copy of this message | ||
Commit: 3dc9bef81916fd203244b8c5fc73d282d333bf9a
Author: Andrey Hristov <andrey@php.net> Wed, 6 Aug 2014 16:25:12 +0300
Parents: f5deb18b205f89cb6708f97f451b43ad5ece4197 ce5efa7adc4637957e70a6f6641a38f484baee99
Branches: PHP-5.6 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=3dc9bef81916fd203244b8c5fc73d282d333bf9a
Log:
Merge branch 'PHP-5.5' into PHP-5.6
Conflicts:
ext/fileinfo/data_file.c
ext/fileinfo/libmagic/softmagic.c
ext/fileinfo/magicdata.patch
Changed paths:
MM ext/fileinfo/data_file.c
MM ext/fileinfo/libmagic/softmagic.c
MM ext/fileinfo/magicdata.patch
MM ext/mysqlnd/mysqlnd_ps.c
MM ext/standard/info.c
Diff:
diff --cc ext/fileinfo/data_file.c
index 8bcd5aa,15e0fa6..5b24670
--- a/ext/fileinfo/data_file.c
+++ b/ext/fileinfo/data_file.c
@@@ -121040,29 -108792,21 +121040,29 @@@ const unsigned char php_magic_database[
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x0F, 0x3D, 0x0D, 0x14, 0x00,
+0x00, 0x00, 0x00, 0x2B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00,
+0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x63, 0x6F, 0x6E, 0x74, 0x65, 0x6E, 0x74,
+0x73, 0x6C, 0x69, 0x6E, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4C, 0x61, 0x54, 0x65, 0x58, 0x20, 0x74, 0x61,
+0x62, 0x6C, 0x65, 0x20, 0x6F, 0x66, 0x20, 0x63, 0x6F, 0x6E, 0x74, 0x65, 0x6E, 0x74, 0x73, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x3D, 0x03, 0x05, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE2, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xAD, 0x36, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x74, 0x65, 0x78, 0x74, 0x2F, 0x78, 0x2D, 0x74,
+0x65, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x4D, 0x47, 0x43, 0x20, 0x61, 0x72, 0x63,
-0x68, 0x69, 0x76, 0x65, 0x20, 0x64, 0x61, 0x74, 0x61, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x40, 0x00, 0x3D, 0x1B, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
++0x00, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x5E, 0x5C, 0x73, 0x7B, 0x30, 0x2C, 0x31, 0x30, 0x30, 0x7D, 0x42, 0x45, 0x47, 0x49, 0x4E, 0x5C,
+0x73, 0x7B, 0x30, 0x2C, 0x31, 0x30, 0x30, 0x7D, 0x5B, 0x7B, 0x5D, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x61, 0x77, 0x6B, 0x20, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x20, 0x74, 0x65, 0x78, 0x74, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
diff --cc ext/fileinfo/libmagic/softmagic.c
index 3dd0782,7e0c856..e000dff
--- a/ext/fileinfo/libmagic/softmagic.c
+++ b/ext/fileinfo/libmagic/softmagic.c
@@@ -1150,8 -1127,7 +1159,7 @@@ mget(struct magic_set *ms, const unsign
int *need_separator, int *returnval)
{
uint32_t soffset, offset = ms->offset;
- uint32_t count = m->str_range;
- int rv, oneed_separator;
+ int rv, oneed_separator, in_type;
char *sbuf, *rbuf;
union VALUETYPE *p = &ms->ms_value;
struct mlist ml;
diff --cc ext/fileinfo/magicdata.patch
index fb34c3c,12fbd3f..524d40b
--- a/ext/fileinfo/magicdata.patch
+++ b/ext/fileinfo/magicdata.patch
@@@ -1,4 -1,83 +1,58 @@@
- Patches applied to file sources tree before generating magic.mgc
-Patches applied to file 5.14 sources tree before generating magic.mgc
++Patches applied to file 5.17 sources tree before generating magic.mgc
and before running create_data_file.php to create data_file.c.
+
-From ef2329cf71acb59204dd981e2c6cce6c81fe467c Mon Sep 17 00:00:00 2001
-From: Christos Zoulas <christos@zoulas.com>
-Date: Mon, 25 Mar 2013 14:06:55 +0000
-Subject: [PATCH] limit to 100 repetitions to avoid excessive backtracking
- Carsten Wolff
-
----
- magic/Magdir/commands | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/magic/Magdir/commands b/magic/Magdir/commands
-index 67c3eee..4a7d8dd 100644
---- a/magic/Magdir/commands
-+++ b/magic/Magdir/commands
-@@ -49,7 +49,7 @@
- !:mime text/x-awk
- 0 string/wt #!\ /usr/bin/awk awk script text executable
- !:mime text/x-awk
--0 regex =^\\s*BEGIN\\s*[{] awk script text
-+0 regex =^\\s{0,100}BEGIN\\s{0,100}[{] awk script text
-
- # AT&T Bell Labs' Plan 9 shell
- 0 string/wt #!\ /bin/rc Plan 9 rc shell script text executable
---
-1.8.5.5
+ From 0b478f445b6b7540b58af5d1fe583fa9e48fd745 Mon Sep 17 00:00:00 2001
+ From: Christos Zoulas <christos@zoulas.com>
+ Date: Wed, 28 May 2014 19:52:36 +0000
+ Subject: [PATCH] further optimize awk by not looking for the BEGIN regex until
+ we found the BEGIN (Jan Kaluza)
+
+ ---
+ magic/Magdir/commands | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+ diff --git a/magic/Magdir/commands b/magic/Magdir/commands
+ index bfffdef..26b2869 100644
+ --- a/magic/Magdir/commands
+ +++ b/magic/Magdir/commands
+ @@ -49,7 +49,8 @@
+ !:mime text/x-awk
+ 0 string/wt #!\ /usr/bin/awk awk script text executable
+ !:mime text/x-awk
+ -0 regex =^\\s{0,100}BEGIN\\s{0,100}[{] awk script text
+ +0 search/16384 BEGIN
+ +>0 regex =^\\s{0,100}BEGIN\\s{0,100}[{] awk script text
+
+ # AT&T Bell Labs' Plan 9 shell
+ 0 string/wt #!\ /bin/rc Plan 9 rc shell script text executable
+ --
+ 2.0.3
+
+ From 71a8b6c0d758acb0f73e2e51421a711b5e9d6668 Mon Sep 17 00:00:00 2001
+ From: Christos Zoulas <christos@zoulas.com>
+ Date: Fri, 30 May 2014 16:48:44 +0000
+ Subject: [PATCH] Limit regex search for BEGIN to the first 4K of the file.
+
+ ---
+ magic/Magdir/commands | 5 ++---
+ 1 file changed, 2 insertions(+), 3 deletions(-)
+
+ diff --git a/magic/Magdir/commands b/magic/Magdir/commands
+ index 26b2869..bcd0f43 100644
+ --- a/magic/Magdir/commands
+ +++ b/magic/Magdir/commands
+ @@ -49,8 +49,7 @@
+ !:mime text/x-awk
+ 0 string/wt #!\ /usr/bin/awk awk script text executable
+ !:mime text/x-awk
+ -0 search/16384 BEGIN
+ ->0 regex =^\\s{0,100}BEGIN\\s{0,100}[{] awk script text
+ +0 regex/4096 =^\\s{0,100}BEGIN\\s{0,100}[{] awk script text
+
+ # AT&T Bell Labs' Plan 9 shell
+ 0 string/wt #!\ /bin/rc Plan 9 rc shell script text executable
+ --
+ 2.0.3
+