Commit Graph

224 Commits

Author SHA1 Message Date
Tim Toohey
d027bc2add Fixed bug #69373
xmlNodeSetContentLen() calls xmlFreeNode() on node->children. This
causes problems if there are other references around to those children.
2017-06-03 00:40:58 +02:00
Sammy Kaye Powers
478f119ab9 Update copyright headers to 2017 2017-01-04 11:14:55 -06:00
Christoph M. Becker
b01b093ca9 Merge branch 'PHP-5.6' into PHP-7.0 2016-07-15 01:14:41 +02:00
Christoph M. Becker
a4aa4f9772 Fix bug #66502: DOM document dangling reference
When we decrement the refcount of a node's document, we state that we
won't need it anymore. Therefore we can *always* set the pointer to the
document to NULL, what avoids invalid memory accesses for some edge cases
as demonstrated with the PHPT.

Original patch provided by Sean Heelan.
2016-07-15 01:08:08 +02:00
Anatol Belski
d0c98366d0 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Extend libxml exports
  Updated NEWS
  Fix #69975: PHP segfaults when accessing nvarchar(max) defined columns
  Updated NEWS
  Fix bug #70480 (php_url_parse_ex() buffer overflow read)
  Update PHP 5.5 NEWS entries with CVE info
2016-07-14 21:13:49 +02:00
Anatol Belski
fe1d6feb3d Extend libxml exports
These are needed to support libxslt 1.1.29 on Windows. This libxslt version
fixes CVE-2015-7995 and for this reason needs to be used.
2016-07-14 21:08:54 +02:00
Nikita Popov
1ac152938c Move semicolon into TSRMLS_CACHE_EXTERN/DEFINE
Also re bug #71575.
2016-03-03 16:50:01 +01:00
Anatol Belski
93592a9c08 Fix bug #71536 Access Violation crashes php-cgi.exe 2016-02-28 11:02:01 +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
Dmitry Stogov
560e4fa393 Removed or simplified incorrect SEPARATE_*() macros usage. 2015-09-29 11:17:43 +03:00
Xinchen Hui
3fc5f5cdb5 Fixed bug #70535 (XSLT: free(): invalid pointer) 2015-09-20 09:30:50 -07:00
Anatol Belski
4e66cce87c switch to the unified globals accessor where appropriate 2015-07-29 13:26:35 +02: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
Christoph M. Becker
b8d8c75c4c added LIBXML_BIGLINES constant 2015-06-08 09:59:37 +02:00
Christoph M. Becker
a1951c2e0a added tests for bug #54138 2015-06-08 09:59:36 +02:00
Christoph M. Becker
f661b10536 replaced / in filename with DIRECTORY_SEPARATOR according to performance warning on DOMDocument::load man page 2015-06-08 09:40:06 +02:00
Christoph M. Becker
03399721f4 added SKIPIF conditional to check for DOM availability 2015-06-08 09:40:05 +02:00
Christoph M. Becker
5fed10e109 added XFAIL test for bug #69753 2015-06-08 09:40:04 +02:00
Anatol Belski
06332e6706 introduced DllMain for the main php DLL
The particular need on this is because of the current situation
with determining the background functionality for the
gettimeofday. DllMain allows to initialize stuff before the DLL
can be actually used. Thus, we use different time API on win7
and win8 and later, so the function pointer needs to be
initialized before anything in the DLL could even demand it.

The change also opens the door for the further optimizations,
as now we're able to do the very basic initializations for the
whole DLL before it could ever start to live. Fe on this way the
TLS initialization could be done, when utilizing the
DLL_THREAD_ATTACH/DETACH case. Whether it's really usable in
portable way should be synced with other platforms.

Be aware that it's dangerous as it possibly causes dead locks.
So to use with care. One willing to add items to DllMain should
better read the documentation twice and even then try to defer
the necessary action.
2015-06-02 15:56:32 +02:00
Anatol Belski
b312a7ee38 extend libxml exports 2015-05-13 15:20:20 +02:00
Anatol Belski
becfdeb2ff improve searchability for libxml2 headers
and bring the configs inline with the current libxml2 build
2015-05-10 22:22:03 +02:00
Anatol Belski
2d78023244 cleanup the mod version macros, round 2 2015-03-23 20:33:54 +01:00
Anatol Belski
293d6e629d backport af2b0669 into 5.5 2015-03-16 08:32:39 +01:00
Anatol Belski
8f0dbe2355 Merge branch 'PHP-5.6'
* PHP-5.6:
  libxml-2.9.2 compatibility
2015-03-15 18:39:38 +01:00
Anatol Belski
af2b066911 libxml-2.9.2 compatibility 2015-03-15 18:38:50 +01:00
Anatol Belski
8742276eb3 abstain from using xmlCleanupParser
Depending on circumstances, usage of xmlCleanupParser can affect
the thread local storage, or even cause crashes in single threaded
programs. On shutdown the memory will be freed anyway, however
not using xmlCleanupParser helps to avoid possible shutdown
crashes.
2015-02-17 10:37:52 +01: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
463611714c Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Fix bug #64938: libxml_disable_entity_loader setting is shared between threads
2015-02-01 00:09:04 -08:00
Martin Jansen
de31324c22 Fix bug #64938: libxml_disable_entity_loader setting is shared between threads
The availability of entity loading is stored in a module global which
previously was only initialized in the GINIT constructor. This had the
effect that disabling the entity loader in one request caused
subsequent requests hitting the same Apache child process to  also have
the loader disabled.

With this change the loader is explicitely enabled in the request init
phase.
2015-02-01 00:08:35 -08:00
Martin Jansen
3a39f3ad70 Fix typos 2015-01-22 21:08:28 +01:00
Martin Jansen
c1eb87ab1a Fix bug #64938: libxml_disable_entity_loader setting is shared between threads
The availability of entity loading is stored in a module global which
previously was only initialized in the GINIT constructor. This had the
effect that disabling the entity loader in one request caused
subsequent requests hitting the same Apache child process to  also have
the loader disabled.

With this change the loader is explicitely enabled in the request init
phase.
2015-01-22 20:58:15 +01: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
Anatol Belski
bdeb220f48 first shot remove TSRMLS_* things 2014-12-13 23:06:14 +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
5749b4a997 ext/libxml, ext/xml and ext/soap use static tsrmls pointer 2014-10-17 14:31:17 +02:00
Anatol Belski
c00424e427 bring back all the TSRMLS_FETCH() stuff
for better comparability with the mainstream
2014-10-15 09:37:55 +02:00
krakjoe
216c6b0f13 remove fetches from libxml 2014-09-26 11:25:10 +01:00
Nikita Popov
2a7de9fdbb Rename smart_str_append to smart_str_append_smart_str
It's used only rarely and I'm running out of append names...
2014-09-21 20:49:39 +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
Johannes Schlüter
d0cb715373 s/PHP 5/PHP 7/ 2014-09-19 18:33:14 +02:00
Anatol Belski
760c51a644 avoid usage of strlen() in the loop 2014-09-13 23:21:53 +02:00
Anatol Belski
c3e3c98ec6 master renames phase 1 2014-08-25 19:24:55 +02:00
Anatol Belski
63d3f0b844 basic macro replacements, all at once 2014-08-19 08:07:31 +02:00