Commit Graph

1172 Commits

Author SHA1 Message Date
Xinchen Hui
999a3553d5 Fixed(attempt to) bug #72405 (mb_ereg_replace - mbc_to_code (oniguruma) - oob read access)
according to ext/mbstring/oniguruma/enc/utf8.c, max bytes are 6
2016-06-15 14:54:57 +08:00
Xinchen Hui
14e790a075 Merge branch 'PHP-7.0' 2016-06-13 18:20:37 -07:00
Xinchen Hui
3d56418722 Fixed bug #72399 (Use-After-Free in MBString (search_re)) 2016-06-13 18:20:26 -07:00
Aaron Piotrowski
771e5cc247 Replace zend_ce_error with NULL and replace more E_ERROR with thrown Error 2016-06-13 09:02:17 -05:00
Aaron Piotrowski
e3c681aa5c Merge branch 'master' into throw-error-in-extensions 2016-06-10 22:02:23 -05:00
Anatol Belski
628272ee6c Merge branch 'PHP-7.0'
* PHP-7.0:
  missing return
2016-06-06 07:34:34 +02:00
Anatol Belski
6ec8b2c57d Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  missing return
2016-06-06 07:33:36 +02:00
Anatol Belski
c05b417718 missing return 2016-06-06 07:28:12 +02:00
Nikita Popov
91f5940329 Forbid dynamic calls to scope introspection functions
Per RFC:
https://wiki.php.net/rfc/forbid_dynamic_scope_introspection
2016-05-24 20:48:24 +02:00
Xinchen Hui
23e362a46e Merge branch 'PHP-7.0'
* PHP-7.0:
  Fixed bug #72164 (Null Pointer Dereference - mb_ereg_replace)
2016-05-05 17:27:58 +08:00
Xinchen Hui
395863b1d1 Fixed bug #72164 (Null Pointer Dereference - mb_ereg_replace) 2016-05-05 17:27:34 +08:00
Kalle Sommer Nielsen
fcc6bdebc2 Added missing zend_parse_parameters_none() to mb_list_encodings() 2016-04-03 02:28:39 +02:00
Anatol Belski
d1ac9edc50 Merge branch 'PHP-7.0'
* PHP-7.0:
  Fixed bug #71704 php_snmp_error() Format String Vulnerability
  Fixed bug #71906: AddressSanitizer: negative-size-param (-1) in mbfl_strcut
  Updated to version 2016.3 (2016c)
  Fixed bug #71906: AddressSanitizer: negative-size-param (-1) in mbfl_strcut
  Fixed bug #71527 Buffer over-write in finfo_open with malformed magic file
  Fix bug #71798 - Integer Overflow in php_raw_url_encode
  update NEWS
  Disable huge pages in the Zend allocator by default As per the discussion on internals, this is an expert feature that needs special system-level configuration and care.
  Added ability to disable huge pages in Zend Memeory Manager through the environment variable USE_ZEND_ALLOC_HUGE_PAGES=0.
  Fix bug #71860: Require valid paths for phar filenames
  Fix bug #71860: Require valid paths for phar filenames
  update NEWS
  Fixed bug #71704 php_snmp_error() Format String Vulnerability
  Merge branch 'PHP-5.6' into PHP-7.0
  Updated to version 2016.2 (2016b)
  update libs versions
  set RC1 versions
  Going for 5.5.34
2016-03-29 11:27:39 +02:00
Stanislav Malyshev
67fbb06311 Merge branch 'PHP-5.5' into PHP-7.0.5
* PHP-5.5:
  Fixed bug #71704 php_snmp_error() Format String Vulnerability
  Fixed bug #71906: AddressSanitizer: negative-size-param (-1) in mbfl_strcut
  Fixed bug #71906: AddressSanitizer: negative-size-param (-1) in mbfl_strcut
  Fix bug #71798 - Integer Overflow in php_raw_url_encode
  Fix bug #71860: Require valid paths for phar filenames
  Going for 5.5.34

Conflicts:
	configure.in
	ext/phar/phar_object.c
	ext/phar/tests/badparameters.phpt
	ext/phar/tests/create_path_error.phpt
	ext/phar/tests/pharfileinfo_construct.phpt
	ext/snmp/snmp.c
	ext/standard/url.c
	main/php_version.h
2016-03-28 23:55:05 -07:00
Stanislav Malyshev
62da5cdf3d Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Fixed bug #71906: AddressSanitizer: negative-size-param (-1) in mbfl_strcut
  Fix bug #71798 - Integer Overflow in php_raw_url_encode
  Fix bug #71860: Require valid paths for phar filenames
  Going for 5.5.34

Conflicts:
	configure.in
	ext/phar/tests/create_path_error.phpt
	main/php_version.h
2016-03-28 23:21:15 -07:00
Stanislav Malyshev
f8dd10508b Fixed bug #71906: AddressSanitizer: negative-size-param (-1) in mbfl_strcut 2016-03-28 23:15:16 -07:00
Francois Laupretre
d0d9e7251e mb_strpos()/mb_stripos(): Add support for negative offset 2016-03-09 14:41:38 +01:00
Francois Laupretre
882f97042b mb_ereg_search_setpos(): Add support for negative position
Also add missing test for this function
2016-03-09 14:41:38 +01:00
Francois Laupretre
70187267b4 mb_strimwidth(): Add support for negative 'start' and 'width' 2016-03-09 14:41:38 +01:00
Francois Laupretre
56fce8990f strpos()/stripos(): Add support for negative offsets 2016-03-09 14:41:37 +01:00
Anatol Belski
89a4342507 fix incompatible pointers on 64-bit 2016-03-07 22:01:44 +01:00
Nikita Popov
1ac152938c Move semicolon into TSRMLS_CACHE_EXTERN/DEFINE
Also re bug #71575.
2016-03-03 16:50:01 +01:00
Yasuo Ohgaki
f9c595f3c0 Fixed bug #65720 ext/mbstring/libmbfl/filters/mbfilter_cp5022x.c:281: bad if test 2016-01-18 10:54:07 +09:00
Yasuo Ohgaki
7554478a4c Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Fixed bug #65720 ext/mbstring/libmbfl/filters/mbfilter_cp5022x.c:281: bad if test
2016-01-18 10:52:11 +09:00
Yasuo Ohgaki
dc23f1f38f Fixed bug #65720 ext/mbstring/libmbfl/filters/mbfilter_cp5022x.c:281: bad if test 2016-01-18 10:51:29 +09:00
Tim Düsterhus
e585696a0b Fixed bug 71397 (mb_send_mail segmentation fault) 2016-01-17 15:30:09 +01:00
Lior Kaplan
ed35de784f Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Happy new year (Update copyright to 2016)
2016-01-01 19:48:25 +02:00
Lior Kaplan
49493a2dcf Happy new year (Update copyright to 2016) 2016-01-01 19:21:47 +02:00
Xinchen Hui
84b997020e Fixed bug #71066 (mb_send_mail: Program terminated with signal SIGSEGV, Segmentation fault) 2015-12-08 17:47:16 -08:00
Lior Kaplan
e322fb0015 SIZEOF_SIZE_T doesn't exist on AIX, keep using SIZEOF_LONG
Follow up for 3689b444
2015-12-02 19:30:05 +02:00
Anatol Belski
2283551cfa fix NULL deref in mbstring post handler 2015-11-05 22:24:47 +01:00
Nikita Popov
1287c48082 Fix/improve zpp usage
The ext/interbase changes are done blindly, fingers crossed.

Some of these are bug fixes, some make zpp usage more idiomatic.
2015-10-02 09:35:00 +02:00
Xinchen Hui
e841016df7 Upgrade unicode_data.h to UnicodeData.txt 8.0.0 (part of bug #70475 ext/mbstring/unicode_data.h needs update) 2015-09-15 07:56:10 -07:00
Anatol Belski
46101dbec5 fix incompatible types
namely between hash_data_type and st_data_t
2015-08-15 12:03:47 +02:00
Anatol Belski
3689b44453 add SIZEOF_SIZE_T to oniguruma 2015-08-15 11:39:06 +02:00
Anatol Belski
228eaf5bc4 fix pointer truncation cases 2015-08-15 11:27:07 +02:00
Anatol Belski
4e66cce87c switch to the unified globals accessor where appropriate 2015-07-29 13:26:35 +02:00
Nikita Popov
f809f28119 Check mbfl_filt_put_invalid_char return value
And fix some libmbfl warnings
2015-07-18 21:53:03 +02:00
Nikita Popov
5c95226d50 Various warning fixes 2015-07-17 20:18:25 +02:00
Aaron Piotrowski
7ec1e17464 Update memory freeing and other issues, revert some changes 2015-07-05 23:25:53 -05:00
Aaron Piotrowski
907476f34c Convert E_ERROR to thrown Error in extensions 2015-07-05 12:16:57 -05:00
Dmitry Stogov
4a2e40bb86 Use ZSTR_ API to access zend_string elements (this is just renaming without semantick changes). 2015-06-30 04:05:24 +03:00
olshevskiy87
8bdec7a248 fix typos
Signed-off-by: olshevskiy87 <olshevskiy87@bk.ru>
2015-05-13 22:28:35 +04:00
Lauri Kenttä
533c4be0d5 Fix compile error when oniguruma is not available 2015-04-13 10:11:38 +02:00
Nikita Popov
6ef9216269 Finish PHP 4 constructor deprecation 2015-03-31 17:55:27 +02:00
Andrea Faulds
db76b708cf Deprecate PHP 4 constructors 2015-03-31 17:55:27 +02:00
Anatol Belski
2d78023244 cleanup the mod version macros, round 2 2015-03-23 20:33:54 +01:00
Anatol Belski
0e30c543ec upgrade to oniguruman 5.9.6 2015-03-12 13:42:36 +01:00
Anatol Belski
ff337bf52b expose oniguruma version 2015-03-12 13:28:43 +01:00
Anatol Belski
4ee0395a4a init mbstring tsrm_ls_cache on MINIT
as some globals are accessed there already
2015-03-11 23:42:39 +01:00
Masaki Kagaya
9d81d7ff70 added missing parentheses
added test case for bug #68846
replaced tab with space
added missing parentheses again
See also: http://icu-project.org/docs/papers/gb18030.html#h7
2015-03-08 23:45:11 -07:00
Masaki Kagaya
934d6ed900 added missing parentheses
added test case for bug #68846
replaced tab with space
added missing parentheses again
See also: http://icu-project.org/docs/papers/gb18030.html#h7
2015-03-08 23:40:56 -07:00
Masaki Kagaya
fa72f1ea86 added missing parentheses
added test case for bug #68846
replaced tab with space
added missing parentheses again
See also: http://icu-project.org/docs/papers/gb18030.html#h7
2015-03-08 23:39:04 -07:00
Adam Harvey
fea9a6fc77 Merge remote-tracking branch 'datibbaw/kill-ereg'
Conflicts:
	ext/ereg/config.w32
	ext/ereg/config0.m4
	ext/ereg/ereg.c
	ext/ereg/php_ereg.h
	ext/ereg/php_regex.h
	ext/ereg/regex/engine.c
	ext/ereg/regex/main.c
	ext/ereg/regex/regcomp.c
	ext/ereg/regex/regerror.c
	ext/ereg/tests/split_error_002.phpt
	ext/ereg/tests/split_variation_003.phpt
	ext/ereg/tests/spliti_error_002.phpt
	ext/ereg/tests/spliti_variation_003.phpt
	ext/pgsql/pgsql.c
	sapi/apache/php_apache_http.h
	sapi/apache_hooks/php_apache_http.h
2015-03-05 00:21:38 +00:00
Anthony Ferrara
e3b020b945 Fix declare error behavior so that improper usages will actually error 2015-02-20 11:43:18 -05:00
Anatol Belski
af3ca74501 made ZEND_TSRMLS_CACHE_* macros look like function calls
which also comply with the current semantics for such macros
2015-02-16 17:19:32 +01:00
Stanislav Malyshev
911f0ea417 Merge branch 'pull-request/1012'
* pull-request/1012:
  Fix uninitalized variables reads. See CWE-457 for more info.
2015-01-31 23:52:10 -08:00
Xinchen Hui
2505aea153 Fixed valgrind issue in mb_ereg_replace_variation1.phpt 2015-01-29 19:28:46 +08:00
Joshua Rogers
6621840951 Fix uninitalized variables reads. See CWE-457 for more info. 2015-01-21 06:52:19 +11:00
Xinchen Hui
fc33f52d8c bump year 2015-01-15 23:27:30 +08:00
Xinchen Hui
0579e8278d bump year 2015-01-15 23:26:37 +08:00
Xinchen Hui
73c1be2653 Bump year 2015-01-15 23:26:03 +08:00
Stanislav Malyshev
b7a7b1a624 trailing whitespace removal 2015-01-10 15:07:38 -08:00
Gustavo Frederico Temple Pedrosa
f5e22d06c3 Specifying MACRO for ppc64
Add PowerPC64 too, which is capable to access unaligned words.
2015-01-04 19:24:41 -08:00
Stanislav Malyshev
599d7a3968 Fix bug #68706 - uninitalized pointer in mbstring 2015-01-03 21:55:29 -08:00
Dmitry Stogov
6ec5ab77df Improved trim/ltrim/rtrim functions.
Now php_trim() operates on zend_string and returns zend_string (it may return the same zend_string).
2014-12-23 04:29:41 +03:00
Andrea Faulds
e5eb9530ab Use "float" and "integer" in typehint and zpp errors 2014-12-21 13:23:02 +00:00
Anatol Belski
4acc56d5b2 Merge remote-tracking branch 'origin/master' into native-tls
* origin/master:
  fix unserializer patch
  move this entry to the correct version
  add missing NEWS entry
  add missing NEWS entry
  Updated or skipped certain 32-bit tests
  add NEWS entry for #68594
  5.4.37
  add more BC breaks
  update news
  add CVE
  add missing test file
  Fix bug #68594 - Use after free vulnerability in unserialize()
  Fix typo
  Hash value must not zero?
2014-12-17 05:29:36 +01:00
Andrea Faulds
1392102b0c Updated or skipped certain 32-bit tests 2014-12-17 01:06:48 +00:00
Anatol Belski
bdeb220f48 first shot remove TSRMLS_* things 2014-12-13 23:06:14 +01:00
Anatol Belski
864cd82ace Merge remote-tracking branch 'origin/master' into native-tls
* origin/master:
  updated NEWS
  refactored the mbstring config.w32
  Update NEWS
  Fixed compilation warnings
  Fixed bug #68504 --with-libmbfl configure option not present on Windows
  Changed "finally" handling. Removed EX(fast_ret) and EX(delayed_exception). Allocate and use additional IS_TMP_VAR slot on VM stack instead.
  the darwin specific test fails for me with the same output which is the expected for the original test I couldn't find anybody who managed to see this test passing, but I found a bunch of other reports on qa.php.net/reports and on google which do see this test failing on mac. if this change causes you to have this test failing on Mac, please drop me a mail so we can improve the current test so it passes for everybody.
  #68446 is fixed
  Reimplemented silence operator (@) handling on exceptions. Now each silence region is stored in op_array->brk_cont_array. On exception ZEND_HANDLE_EXCEPTION handler traverse this array and restore original EG(error_reporting) if exception occured inside a "silence" region.
  remove the NEWS entries for the reverted stuff
  typo fix
  go back with phpdbg to the state of 5.6.3, reverting the controversial commits(remote debugging/xml protocol)
  5.5.21 now
  New label length test
  Fix ext/filter/tests/033.phpt
  Fix filter_list test
  FILTER_VALIDATE_DOMAIN and RFC conformance for FILTER_VALIDATE_URL

Conflicts:
	ext/mbstring/config.w32
2014-11-27 15:59:43 +01:00
Anatol Belski
4dcc8a6371 Merge branch 'PHP-5.6'
* PHP-5.6:
  updated NEWS
  refactored the mbstring config.w32
  Fixed bug #68504 --with-libmbfl configure option not present on Windows
2014-11-27 13:40:34 +01:00
Anatol Belski
088f8b528b Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  refactored the mbstring config.w32
  Fixed bug #68504 --with-libmbfl configure option not present on Windows
2014-11-27 13:39:23 +01:00
Anatol Belski
42af411620 refactored the mbstring config.w32 2014-11-27 13:37:00 +01:00
Anatol Belski
3ec8730e89 Fixed bug #68504 --with-libmbfl configure option not present on Windows 2014-11-27 09:14:47 +01:00
Anatol Belski
3ca0ca1548 Merge remote-tracking branch 'origin/master' into native-tls
* origin/master: (102 commits)
  fix dir separator in test
  fix TS build
  fix TS build
  Better fix for bug #68446
  Revert "Merge remote-tracking branch 'origin/PHP-5.6'"
  Revert NEWS and set test to XFAIL
  Revert "Fix bug #68446 (bug with constant defaults and type hints)"
  Improved zend_hash_clean() and added new optimized zend_symtable_clean()
  Use inline version of zval_ptr_dtor()
  Added new optimized zend_array_destroy() function
  Moved i_zval_ptr_dtor() from zend_execute.h to zend_variables.h
  fix REGISTER_NS_*_CONSTANT macros
  Removed useless assert. EG(uninitialized_zval) can't be refcounted.
  Use specialized destructors when types of zvals are known.
  move tests into proper place
  Improved assignment to object property
  Reuse zend_assign_to_variable() in zend_std_write_property()
  cleanup comments from svn/cvs era
  fix dir separator in test
  fork test for windows
  ...
2014-11-26 08:17:35 +01:00
Veres Lajos
06fdf359e3 typo fixes - https://github.com/vlajos/misspell_fixer 2014-11-23 14:52:47 -08:00
Veres Lajos
4dc994571d typo fixes - https://github.com/vlajos/misspell_fixer
Conflicts:
	ext/ftp/ftp.h
	ext/pcre/pcrelib/pcre_printint.c
	ext/pcre/pcrelib/sljit/sljitLir.c
	ext/pcre/pcrelib/sljit/sljitLir.h
	ext/pcre/pcrelib/sljit/sljitNativeARM_32.c
	ext/pcre/pcrelib/sljit/sljitNativeTILEGX_64.c
	ext/pgsql/pgsql.c
	ext/phar/func_interceptors.c
	ext/soap/soap.c
	ext/standard/image.c
2014-11-23 14:33:43 -08:00
Anatol Belski
7a6a3d923b fix arg order, CFLAGS is the fifth arg in m4 2014-10-17 16:03:40 +02:00
Anatol Belski
0490a32249 more exts converted for static tsrm ls pointer
mbstring, pcre, reflection
2014-10-15 19:19:23 +02:00
Nikita Popov
43f1c94dda Review a few more SEPARATE_ZVAL_IF_NOT_REF usages 2014-10-09 12:51:05 +02:00
Anatol Belski
4b3e198023 removed *.dsw and *.dsp files 2014-09-28 19:02:09 +02:00
Nikita Popov
e33f3d3b7c Move smart_str implementation into Zend/
So we can use it there as well...

For now I've retained the zend_smart_str_public.h header, though
it would probably be better to just move that one struct into
zend_types.h.
2014-09-21 20:49:39 +02:00
Florian MARGAINE
8eb7e7bf7f Merge branch 'master' into issue-67910
Conflicts:
	README.PARAMETER_PARSING_API
	ext/gmp/tests/001.phpt
2014-09-20 10:09:21 +02:00
Florian MARGAINE
cf0303e782 Replaces php5 with php7, without whitespace changes. 2014-09-20 10:01:44 +02:00
Anatol Belski
3abeb2c8e1 reduce the struct size by 8 byte on 64 bit 2014-09-20 01:43:04 +02:00
Johannes Schlüter
d0cb715373 s/PHP 5/PHP 7/ 2014-09-19 18:33:14 +02:00
Anatol Belski
469c9bdb39 simplify condition 2014-09-19 16:30:01 +02:00
Anatol Belski
bf7203e1e0 fix empty string check 2014-09-19 11:23:23 +02:00
Anatol Belski
bae92295fd remove useless condition 2014-09-19 10:09:37 +02:00
Anatol Belski
49a6b485a0 redo the fix casting to size_t where applicable 2014-09-16 21:17:19 +02:00
Anatol Belski
fba6e5a8cb fix signed/unsigned mismatch warnings 2014-09-16 21:17:16 +02:00
Anatol Belski
8240255e37 fixed signed/unsigned mismatch warning 2014-09-16 21:17:15 +02:00
Nikita Popov
e2d4d700cf Fix yy_limit computation after encoding switch
The three assignments above this line are still broken - they assume
that byte offsets in one encoding directly map to byte offsets in
another encoding.

I'm fixing the length here because it is the one causing out-of-bounds
reads and is easy to fix. For the others we'd have to actually compute
new offsets.
2014-09-11 14:52:59 +02:00
Nikita Popov
f017843df3 Remove self-contradictory zend multibyte assertion
Code that explicitly exists to handle an incompatible internal
encoding should not assert that the internal encoding is compatible.
2014-09-11 14:52:59 +02:00
Tjerk Meesters
18fa07e68f Revert "Revert "Removing ext/ereg and dependencies""
This reverts commit 1981dd9c73.
2014-09-11 19:25:42 +08:00
Dmitry Stogov
1981dd9c73 Revert "Removing ext/ereg and dependencies"
This reverts commit 86de7963fe.
2014-09-11 11:06:57 +04:00
Tjerk Meesters
86de7963fe Removing ext/ereg and dependencies
Affected extensions:
- opcache (use pcre)
- mbstring (removed ereg functions overloading)
- pgsql (use pcre)
- reflection (test cases using 'ereg')

SAPI:
- apache (header only)
- apache_hooks (header only)
2014-09-11 10:22:44 +08:00
Dmitry Stogov
88d7ca44f6 Refactored INI subsystem to use zend_string* instead of char* 2014-09-01 20:57:33 +04:00
Anatol Belski
6db8d4f829 's' works with size_t round 3 2014-08-27 20:49:36 +02:00