1
0
mirror of https://github.com/php/php-src.git synced 2026-04-23 16:08:35 +02:00
Commit Graph

217 Commits

Author SHA1 Message Date
Ard Biesheuvel 8312836c74 Merge branch 'PHP-5.5' into PHP-5.6 2014-09-20 16:42:12 -07:00
Ard Biesheuvel 7958793342 Merge branch 'PHP-5.4' into PHP-5.5 2014-09-20 16:40:02 -07:00
Ard Biesheuvel e64da8c20d Fixed bug #66242 (don't assume char is signed)
This fixes a bug in libmagic where a cast to 'char' is assumed to result
in sign extension to occur. However, unqualified 'char' is unsigned on
architectures such as ARM, so the cast needs to be to 'signed char'
explicitly.

Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
2014-09-20 16:39:48 -07:00
Anatol Belski c301467f9b Fixed bug #67731 finfo::file() returns invalid mime type for binary files 2014-08-30 04:04:42 +02:00
Stanislav Malyshev 23122ba69c Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Fix bug #67716 - Segfault in cdf.c
  Fix bug #67716 - Segfault in cdf.c
2014-08-14 17:22:06 -07:00
Stanislav Malyshev 3468f03b6f Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fix bug #67716 - Segfault in cdf.c
2014-08-14 17:21:29 -07:00
Remi Collet 35f32637b0 Fix bug #67716 - Segfault in cdf.c 2014-08-14 17:21:20 -07:00
Remi Collet 49387b31cf Fix bug #67716 - Segfault in cdf.c 2014-08-14 17:19:03 -07:00
Andrey Hristov 3dc9bef819 Merge branch 'PHP-5.5' into PHP-5.6
Conflicts:
	ext/fileinfo/data_file.c
	ext/fileinfo/libmagic/softmagic.c
	ext/fileinfo/magicdata.patch
2014-08-06 16:25:12 +03:00
Andrey Hristov 41e1ccefd5 Merge branch 'PHP-5.4' into PHP-5.5
Conflicts:
	NEWS
	configure.in
	main/php_version.h
2014-08-06 15:27:56 +03:00
Stanislav Malyshev eeaec70758 Fix bug #67705 (extensive backtracking in rule regular expression) 2014-08-04 00:05:40 -07:00
Remi Collet 0a7e131128 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  NEWS
  NEWS
  Fixed Bug #67413 	fileinfo: cdf_read_property_info insufficient boundary chec
2014-06-10 14:36:02 +02:00
Remi Collet 12a62ce868 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  NEWS
  Fixed Bug #67413 	fileinfo: cdf_read_property_info insufficient boundary chec
2014-06-10 14:35:23 +02:00
Remi Collet 25b1dc917a Fixed Bug #67413 fileinfo: cdf_read_property_info insufficient boundary chec
Upstream:
https://github.com/file/file/commit/93e063ee374b6a75729df9e7201fb511e47e259d

Adapted for C standard.
2014-06-10 14:33:37 +02:00
Remi Collet 9ee147e6ff Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  NEWS
  NEWS
  Bug #67412 	fileinfo: cdf_count_chain insufficient boundary check
2014-06-10 14:24:07 +02:00
Remi Collet ff66c90af0 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  NEWS
  Bug #67412 	fileinfo: cdf_count_chain insufficient boundary check
2014-06-10 14:23:37 +02:00
Remi Collet 40ef6e07e0 Bug #67412 fileinfo: cdf_count_chain insufficient boundary check
Upstream:
https://github.com/file/file/commit/40bade80cbe2af1d0b2cd0420cebd5d5905a2382
2014-06-10 14:22:04 +02:00
Remi Collet 1d6286c049 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  NEWS
  NEWS
  Fixed Bug #67411 	fileinfo: cdf_check_stream_offset insufficient boundary check
2014-06-10 14:16:39 +02:00
Remi Collet f6fee381be Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  NEWS
  Fixed Bug #67411 	fileinfo: cdf_check_stream_offset insufficient boundary check
2014-06-10 14:16:07 +02:00
Remi Collet 5c9f967999 Fixed Bug #67411 fileinfo: cdf_check_stream_offset insufficient boundary check
Upstream:
https://github.com/file/file/commit/36fadd29849b8087af9f4586f89dbf74ea45be67
2014-06-10 14:13:14 +02:00
Remi Collet 5e7cb43890 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  NEWS
  NEWS
  Fixed Bug #67410 fileinfo: mconvert incorrect handling of truncated pascal string size
2014-06-10 14:05:02 +02:00
Remi Collet 18ff81eb1a Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  NEWS
  Fixed Bug #67410 fileinfo: mconvert incorrect handling of truncated pascal string size
2014-06-10 14:04:36 +02:00
Remi Collet e77659a8c8 Fixed Bug #67410 fileinfo: mconvert incorrect handling of truncated pascal string size
Upstream
https://github.com/file/file/commit/27a14bc7ba285a0a5ebfdb55e54001aa11932b08
2014-06-10 14:02:36 +02:00
Anatol Belski f3f22ff5c6 Fixed bug #67329 fileinfo: NULL pointer deference flaw by processing certain CDF files 2014-06-03 11:37:20 +02:00
Remi Collet e61f7727d4 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  NEWS
  NEWS
  Fix bug #67326	fileinfo: cdf_read_short_sector insufficient boundary check
2014-06-03 11:09:29 +02:00
Remi Collet 2d59b87527 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  NEWS
  Fix bug #67326	fileinfo: cdf_read_short_sector insufficient boundary check
2014-06-03 11:09:04 +02:00
Remi Collet 4fcb9a9d1b Fix bug #67326 fileinfo: cdf_read_short_sector insufficient boundary check
Upstream fix https://github.com/file/file/commit/6d209c1c489457397a5763bca4b28e43aac90391.patch
Only revelant part applied
2014-06-03 11:05:00 +02:00
Stanislav Malyshev bc87ba8ee6 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  backport this piece from 5.6, related to the #66307 fix
  Fixed bug #66307 Fileinfo crashes with powerpoint files
  Fix bug #67328 (fileinfo: numerous file_printf calls resulting in performance degradation)
  Fix bug #67327: fileinfo: CDF infinite loop in nelements DoS
  fix my last commit with some locales
2014-05-26 18:06:58 -07:00
Anatol Belski d184f07b3c backport this piece from 5.6, related to the #66307 fix 2014-05-26 18:05:13 -07:00
Anatol Belski 15ee33eb21 Fixed bug #66307 Fileinfo crashes with powerpoint files 2014-05-26 18:04:27 -07:00
Stanislav Malyshev 5ce11c2698 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fix bug #67328 (fileinfo: numerous file_printf calls resulting in performance degradation)
  Fix bug #67327: fileinfo: CDF infinite loop in nelements DoS
2014-05-26 18:03:01 -07:00
Stanislav Malyshev 4005f06df6 Fix bug #67328 (fileinfo: numerous file_printf calls resulting in performance degradation)
Upstream patch: https://github.com/file/file/commit/b8acc83781d5a24cc5101e525d15efe0482c280d
2014-05-26 18:01:17 -07:00
Stanislav Malyshev 57225f09ed Fix bug #67327: fileinfo: CDF infinite loop in nelements DoS
Upstream fix: https://github.com/file/file/commit/f97486ef5dc3e8735440edc4fc8808c63e1a3ef0
2014-05-26 17:45:14 -07:00
Anatol Belski 031cafd4e2 added missing stdint header, bug #66907 2014-05-04 21:26:53 +02:00
Anatol Belski d7bb09cc1d backport this piece from 5.6, related to the #66307 fix 2014-04-24 19:50:23 +02:00
Anatol Belski 74ce9da5dc Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Fixed bug #66307 Fileinfo crashes with powerpoint files

Conflicts:
	ext/fileinfo/libmagic/readcdf.c
2014-04-24 19:33:54 +02:00
Anatol Belski 03fa5501a8 Fixed bug #66307 Fileinfo crashes with powerpoint files 2014-04-24 19:30:34 +02:00
Anatol Belski aaf197180a Fixed bug #66907 Solaris 10 is missing strcasestr and needs substitute 2014-04-15 10:26:49 -07:00
Remi Collet 62305edc5b Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  NEWS
  NEWS
  Fixed Bug #66987 Memory corruption in fileinfo ext (bigendian)
2014-03-31 16:57:39 +02:00
Remi Collet 178eac6c98 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  NEWS
  Fixed Bug #66987 Memory corruption in fileinfo ext (bigendian)
2014-03-31 16:57:12 +02:00
Remi Collet 2c204a55af Fixed Bug #66987 Memory corruption in fileinfo ext (bigendian)
On little endian:
	map->p == php_magic_database
	map->magic[i] = pointer into the map

	map->p == NULL
	map->magic[i] = pointer to allocated memory

On big endian (ppc64, s390x, ...):
	map->p != php_magic_database and map->p != NULL
        map->magic[i] = pointer into a copy of the map

Trying to efree pointer in the later cause memory corruption
Thanks to dkatulek / Red Hat for the report.
2014-03-31 16:50:47 +02:00
Anatol Belski 62f6c5853f Fixes to various stream cast on win64
This fixes further issues on win64 with casts from the streams.
Sockets/descriptors handling was unitized. This has an impact only on
win64, php_socket_t otherwise can be feed back to int datatype.
2014-03-19 06:33:46 +01:00
Remi Collet 9a9add6b73 fix merge 2014-03-04 20:39:00 +01:00
Remi Collet 5d08cae346 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  NEWS
  Fixed Bug #66820 out-of-bounds memory access in fileinfo
2014-03-04 20:36:08 +01:00
Remi Collet a33759fd27 Fixed Bug #66820 out-of-bounds memory access in fileinfo
Upstream fix:
https://github.com/glensc/file/commit/447558595a3650db2886cd2f416ad0beba965801

Notice, test changed, with upstream agreement:
-define OFFSET_OOB(n, o, i)	((n) < (o) || (i) >= ((n) - (o)))
+define OFFSET_OOB(n, o, i)	((n) < (o) || (i) >  ((n) - (o)))
2014-03-04 20:32:52 +01:00
Remi Collet 834b719cf5 fix merge 2014-03-04 13:46:21 +01:00
Remi Collet bc0b6e02e4 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Improves fix for memory leak, keep in sync with upstream.
2014-03-04 13:43:42 +01:00
Remi Collet 731013ee8e Improves fix for memory leak, keep in sync with upstream.
Previous fix:
http://git.php.net/?p=php-src.git;a=commitdiff;h=10eb0070700382f966bf260e44135e1f724a15d2

Upstream fix:
https://github.com/glensc/file/commit/c0c0032b9e9eb57b91fefef905a3b018bab492d9
2014-03-04 13:41:37 +01:00
Anatol Belski 67d281f093 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  fixed leak introduced after CVE/upgrade
2014-02-20 18:55:05 +01:00
Anatol Belski 6d4d4155d2 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  fixed leak introduced after CVE/upgrade
2014-02-20 18:54:35 +01:00