Anatol Belski
321c0cc349
Fix localized error messages and memory leaks
...
The FormatMessage API needs to LocalFree the delivered error messages.
In cases where messages are delivered in non ASCII compatible encoding,
the messages might be unreadable. This aligns the error message encoding
with the encoding settings in PHP, the focus is UTF-8 as default.
Initialize error buffer
Avoid code duplication
2018-09-17 10:56:50 +02:00
Nikita Popov
dfa166e7ed
Remove unused ZEND_FILE_LINE in i_zval_ptr_dtor
2018-09-16 17:16:26 +02:00
Peter Kokot
8d3f8ca12a
Remove unused Git attributes ident
...
The $Id$ keywords were used in Subversion where they can be substituted
with filename, last revision number change, last changed date, and last
user who changed it.
In Git this functionality is different and can be done with Git attribute
ident. These need to be defined manually for each file in the
.gitattributes file and are afterwards replaced with 40-character
hexadecimal blob object name which is based only on the particular file
contents.
This patch simplifies handling of $Id$ keywords by removing them since
they are not used anymore.
2018-07-25 00:53:25 +02:00
Dmitry Stogov
b121405960
Use better destructor (key may be only IS_STRING or IS_LONG).
2018-07-23 15:57:06 +03:00
Xinchen Hui
e3355ac5ec
Revert "Rename _zval_dtor_func to _ref_dtor_func"
...
This reverts commit a362ae6b12
.
2018-07-06 18:37:45 +08:00
Xinchen Hui
a362ae6b12
Rename _zval_dtor_func to _ref_dtor_func
2018-07-06 18:32:27 +08:00
Dmitry Stogov
af341213f7
se zval_ptr_dtor_str() instead of zend_string_release_ex(Z_STR(*), 0)
2018-07-04 12:08:07 +03:00
Nikita Popov
a57b5e82a9
Merge branch 'PHP-7.2'
2018-07-02 17:30:07 +02:00
Nikita Popov
09bb2527e9
Merge branch 'PHP-7.1' into PHP-7.2
2018-07-02 17:29:32 +02:00
Nikita Popov
c793885b76
Fixed bug #74670
...
Validate that "C" serialization payload is followed by "}" prior to
calling the unserialize() handler. This mitigates issues caused by
unserialize() not correctly handling strings that are not NUL
terminated. Making sure that there is a "}" at the end avoids the
problem.
2018-07-02 17:27:43 +02:00
Pedro Magalhães
13e9a471d7
Fix #76300 - Dont attempt to change visibility of a parent private
2018-06-17 15:53:55 -07:00
Stanislav Malyshev
7d7b7e801e
Merge branch 'PHP-7.2'
...
* PHP-7.2:
Fix #76300 - Dont attempt to change visibility of a parent private
2018-06-17 15:47:06 -07:00
Dmitry Stogov
d90c6f2443
Removed useless zval_ptr_dtor()
2018-05-29 17:58:06 +03:00
Dmitry Stogov
5eb1f92f31
Use zend_string_release_ex() instread of zend_string_release() in places, where we sure about string persistence.
2018-05-28 16:27:12 +03:00
Dmitry Stogov
524f5245c5
Avoid useless checks, using zend_string_efree(), in cases where the string is known to be a temporary allocated zend_string.
2018-05-08 17:30:15 +03:00
Pedro Magalhães
2dca8671e4
Fix #76300 - Dont attempt to change visibility of a parent private
2018-05-03 21:54:44 +01:00
Dmitry Stogov
a795bd8265
Optimize zend_hash_real_init()
2018-03-23 00:13:45 +03:00
Dmitry Stogov
6f483dc94c
Use macros to update specific parts of GC_TYPE_INFO() (direct assignments to GC_TYPE(), GC_FLAGS() and GC_INFO() are prohibited)
2018-02-28 00:52:12 +03:00
Dmitry Stogov
a561d6a6ee
Use OBJ_FLAGS() macro to access object flags (even if they are currently stored together with GC_FLAGS)
2018-01-22 16:10:33 +03:00
Dmitry Stogov
c75346dcb5
ws
2018-01-22 13:37:48 +03:00
Dmitry Stogov
9cbb521094
Access HashTable.u.flags through HT_FLAGS() macro.
2018-01-22 13:36:15 +03:00
Gabriel Caruso
6400264856
Trailing whitespaces
...
Signed-off-by: Gabriel Caruso <carusogabriel34@gmail.com>
2018-01-03 14:38:00 +01:00
Xinchen Hui
a6519d0514
year++
2018-01-02 12:57:58 +08:00
Xinchen Hui
7a7ec01a49
year++
2018-01-02 12:55:14 +08:00
Xinchen Hui
ccd4716ec7
year++
2018-01-02 12:53:31 +08:00
Dmitry Stogov
a5014d7c58
Avoid visibility checks for classes without predefined properties
2017-11-30 13:13:42 +03:00
Dmitry Stogov
03da5f8e30
Try to intern unserualized string keys
2017-11-29 19:00:57 +03:00
Dmitry Stogov
2205631209
Optimized parse_iv2()
2017-11-09 14:20:09 +03:00
Dmitry Stogov
cf67a421e9
Use per-request heap instead of system one
2017-10-27 14:45:54 +03:00
Dmitry Stogov
9cf87aa196
Avoid HashTable allocations for empty arrays (using zend_empty_array).
2017-10-24 17:27:31 +03:00
Dmitry Stogov
f26fc527da
Fixed unzserialize(), to disable creation of unsupported data structures through manually crafted strings. (Dmitry)
2017-10-13 15:53:11 +03:00
Xinchen Hui
4b12a438e7
Merge branch 'PHP-7.2'
...
* PHP-7.2:
Update NEWS
Fixed bug #75152 (signed integer overflow in parse_iv)
2017-09-11 12:48:16 +08:00
Xinchen Hui
82d4727dbb
Merge branch 'PHP-7.1' into PHP-7.2
...
* PHP-7.1:
Fixed bug #75152 (signed integer overflow in parse_iv)
Conflicts:
ext/standard/var_unserializer.c
2017-09-11 12:47:47 +08:00
Xinchen Hui
6b2813c3a7
Fixed bug #75152 (signed integer overflow in parse_iv)
2017-09-11 12:46:11 +08:00
Kalle Sommer Nielsen
4fbff82c10
Kill compiler warnings in ext/standard
2017-08-24 01:36:14 +02:00
Nikita Popov
a871badf2a
Merge branch 'PHP-7.1' into PHP-7.2
2017-08-12 13:17:24 +02:00
Nikita Popov
4fb7665c09
Merge branch 'PHP-7.0' into PHP-7.1
2017-08-12 13:15:48 +02:00
Nikita Popov
1a23ebc1ff
Fixed bug #74103 and bug #75054
...
Directly fail unserialization when trying to acquire an r/R
reference to an UNDEF HT slot. Previously this left an UNDEF and
later deleted the index/key from the HT.
What actually caused the issue here is a combination of two
factors: First, the key deletion was performed using the hash API,
rather than the symtable API, such that the element was not actually
removed if it used an integral string key. Second, a subsequent
deletion operation, while collecting trailing UNDEF ranges, would
mark the element as available for reuse (leaving a corrupted HT
state with nNumOfElemnts > nNumUsed).
Fix this by failing early and dropping the deletion code.
2017-08-12 13:11:35 +02:00
Remi Collet
d5f7e01f7c
restore file deleted by mistake in a merge commit
2017-07-11 13:07:51 +02:00
Stanislav Malyshev
d75dbb0e31
Merge branch 'PHP-7.1'
...
* PHP-7.1:
Improve fix for #74145
Fix wddx
Fix tests
Fixed bug #74111
Fix bug #74603 - use correct buffer size
Fix bug #74651 - check EVP_SealInit as it can return -1
Update NEWS
Fix bug #74087
Fixed parsing of strange formats with mixed month/day and time strings
Fix bug #74145 - wddx parsing empty boolean tag leads to SIGSEGV
Fixed bug #74111
Fix #74435 : Buffer over-read into uninitialized memory
Fix bug #74603 - use correct buffer size
Fix bug #74651 - check EVP_SealInit as it can return -1
Update NEWS
Fix bug #73807
2017-07-04 21:23:16 -07:00
Stanislav Malyshev
0ba04f7737
Merge branch 'PHP-7.0' into PHP-7.1
...
* PHP-7.0:
Improve fix for #74145
Fix wddx
Fix tests
Fixed bug #74111
Fix bug #74603 - use correct buffer size
Fix bug #74651 - check EVP_SealInit as it can return -1
Update NEWS
Fix bug #74087
Fixed parsing of strange formats with mixed month/day and time strings
Fix bug #74145 - wddx parsing empty boolean tag leads to SIGSEGV
Fixed bug #74111
Fix #74435 : Buffer over-read into uninitialized memory
Fix bug #74603 - use correct buffer size
Fix bug #74651 - check EVP_SealInit as it can return -1
Update NEWS
Fix bug #73807
2017-07-04 21:18:10 -07:00
Nikita Popov
3a25a56a92
Fixed bug #74111
2017-07-04 19:38:42 -07:00
Anatol Belski
a0203ea143
fix datatype
2017-07-04 16:41:29 +02:00
Anatol Belski
41ba98f02d
Merge branch 'PHP-7.0' into PHP-7.1
...
* PHP-7.0:
fix datatype
2017-07-04 16:38:12 +02:00
Anatol Belski
a29264eb8c
fix datatype
2017-07-04 16:37:17 +02:00
Anatol Belski
b28c6515a6
Merge branch 'PHP-7.1'
...
* PHP-7.1:
Fixed bug #74101 and bug #74614
2017-07-04 10:44:50 +02:00
Anatol Belski
2dc24005d9
Merge branch 'PHP-7.0' into PHP-7.1
...
* PHP-7.0:
Fixed bug #74101 and bug #74614
2017-07-04 10:42:48 +02:00
Nikita Popov
d02f953faf
Fixed bug #74101 and bug #74614
2017-07-04 10:39:41 +02:00
Dmitry Stogov
10dc924999
Use inlined version of zval_ptr_dytor() in var_destroy() loop
2017-06-29 12:16:52 +03:00
Dmitry Stogov
a08723d3d3
Use interned empty and "one char" strings.
2017-05-18 17:59:59 +03:00