Commit graph

184 commits

Author SHA1 Message Date
Nikita Popov
c2a2d2438a Fix double free on unpack error 2020-09-22 23:31:56 +02:00
Nikita Popov
de77344de2 Promote pack/unpack format errors
Errors related to invalid format strings (unlike data mismatch
errors) should throw ValueError.

Closes GH-6185.
2020-09-22 15:12:05 +02:00
Nikita Popov
048cc9ba78 Convert unpack offset warning to ValueError 2020-09-22 14:13:26 +02:00
Max Semenik
2b5de6f839
Remove proto comments from C files
Closes GH-5758
2020-07-06 21:13:34 +02:00
Máté Kocsis
7b4a4d2ace
Use RETURN_THROWS() after try_convert_to_string() 2020-01-03 17:04:06 +01:00
Christoph M. Becker
0dba3a8e43 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix #78833: Integer overflow in pack causes out-of-bound access
2019-12-02 11:21:37 +01:00
Christoph M. Becker
4ff242a9a7 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #78833: Integer overflow in pack causes out-of-bound access
2019-12-02 11:21:07 +01:00
Christoph M. Becker
3d81c54879 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix #78833: Integer overflow in pack causes out-of-bound access
2019-12-02 11:19:15 +01:00
Christoph M. Becker
db420cb6a1 Fix #78833: Integer overflow in pack causes out-of-bound access
We check for potential signed integer overflow, and bail out
gracefully, in that case.
2019-12-02 11:18:19 +01:00
Gabriel Caruso
5d6e923d46
Remove mention of PHP major version in Copyright headers
Closes GH-4732.
2019-09-25 14:51:43 +02:00
Nikita Popov
7686b0b889 Merge branch 'PHP-7.4' 2019-06-05 14:53:50 +02:00
Nikita Popov
a31f46421d Allow exceptions in __toString()
RFC: https://wiki.php.net/rfc/tostring_exceptions

And convert some object to string conversion related recoverable
fatal errors into Error exceptions.

Improve exception safety of internal code performing string
conversions.
2019-06-05 14:25:07 +02:00
Nikita Popov
001d434449 Finish func_info updates for ext/standard 2019-06-03 11:26:25 +02:00
Peter Kokot
92ac598aab Remove local variables
This patch removes the so called local variables defined per
file basis for certain editors to properly show tab width, and
similar settings. These are mainly used by Vim and Emacs editors
yet with recent changes the once working definitions don't work
anymore in Vim without custom plugins or additional configuration.
Neither are these settings synced across the PHP code base.

A simpler and better approach is EditorConfig and fixing code
using some code style fixing tools in the future instead.

This patch also removes the so called modelines for Vim. Modelines
allow Vim editor specifically to set some editor configuration such as
syntax highlighting, indentation style and tab width to be set in the
first line or the last 5 lines per file basis. Since the php test
files have syntax highlighting already set in most editors properly and
EditorConfig takes care of the indentation settings, this patch removes
these as well for the Vim 6.0 and newer versions.

With the removal of local variables for certain editors such as
Emacs and Vim, the footer is also probably not needed anymore when
creating extensions using ext_skel.php script.

Additionally, Vim modelines for setting php syntax and some editor
settings has been removed from some *.phpt files.  All these are
mostly not relevant for phpt files neither work properly in the
middle of the file.
2019-02-03 21:03:00 +01:00
Zeev Suraski
0cf7de1c70 Remove yearly range from copyright notice 2019-01-30 11:03:12 +02:00
Peter Kokot
902d39a3a7 Trim trailing whitespace in source code files 2018-10-13 14:14:50 +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
4a475a4976 Replace legacy zval_dtor() by zval_ptr_dtor_nogc() or even more specialized destructors.
zval_dtor() doesn't make a lot of sense in PHP-7.* and it's used incorrectly in some places.
Its occurances should be replaced by zval_ptr_dtor() or zval_ptr_dtor_nogc(), or even more specialized destructors.
2018-07-04 19:22:24 +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
Dmitry Stogov
ccc12b82da Avoid unnecessary reference-counting on strings. 2017-11-16 17:09:32 +03:00
Xinchen Hui
05de40a651 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Update NEWS
  Fixed bug #75075 (unpack with X* causes infinity loop)
2017-08-15 12:35:10 +08:00
Xinchen Hui
4f8e703854 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed bug #75075 (unpack with X* causes infinity loop)
2017-08-15 12:34:37 +08:00
Xinchen Hui
d8c80af71e Fixed bug #75075 (unpack with X* causes infinity loop) 2017-08-15 12:34:13 +08:00
Xinchen Hui
dc098b09f8 Avoiding str duplication 2017-06-13 14:00:53 +08:00
Sammy Kaye Powers
dac6c639bb Update copyright headers to 2017 2017-01-04 11:23:42 -06:00
Sammy Kaye Powers
478f119ab9 Update copyright headers to 2017 2017-01-04 11:14:55 -06:00
Sammy Kaye Powers
1e3624290a Resolve conflict 2017-01-03 08:01:05 -06:00
Nikita Popov
08b68b9781 Merge branch 'PHP-7.1' 2017-01-03 12:19:08 +01:00
Nikita Popov
661fad7beb Merge branch 'PHP-7.0' into PHP-7.1 2017-01-03 12:18:33 +01:00
Nikita Popov
b3889d4b20 Fix build 2017-01-03 12:16:35 +01:00
Joe Watkins
ff4e330eae
Merge branch 'pull-request/1905'
* pull-request/1905:
   pack()/unpack() for Big Endian float/double and Little Endian float/double
2017-01-03 10:50:19 +00:00
Joe Watkins
e42a01bcd5
Merge branch 'pull-request/1905'
* pull-request/1905:
   pack()/unpack() for Big Endian float/double and Little Endian float/double
2017-01-03 10:49:53 +00:00
sskaje
4935f795e8 Merge branch 'master' into master 2017-01-03 18:42:27 +08:00
Sammy Kaye Powers
9e29f841ce Update copyright headers to 2017 2017-01-02 09:30:12 -06:00
Sara Golemon
a23f08a33c Use new param API in standard 2016-12-30 17:28:55 -08:00
Kalle Sommer Nielsen
2104bea5d7 Remove Netware support
If this does not break the Unix system somehow, I'll be amazed. This should get most of it out, apologies for any errors this may cause on non-Windows ends which I cannot test atm.
2016-11-12 11:20:01 +01:00
Dmitry Stogov
adc95c5114 Fixed compilation warnings 2016-06-23 12:47:06 +03:00
sskaje
cb2bae018f better but longer way processing float/double and memory 2016-05-31 20:08:09 +08:00
sskaje
b56352aa1d PR#1905: directly copy to target memory 2016-05-13 17:41:59 +08:00
sskaje
267ddb3abd missing efree() 2016-05-13 15:55:41 +08:00
sskaje
92bcc10e10 comments for e,E,g,G 2016-05-12 19:16:29 +08:00
sskaje
540f4b5cf6 pack()/unpack() for Big Endian float/double and Little Endian float/double 2016-05-12 19:13:21 +08:00
Dmitry Stogov
a9a26100b4 unpack() function accepts an additional optional argument $offset. 2016-03-03 13:49:45 +03:00
Nikita Popov
c9357f82d3 Format string fixes
Conflicts:
	ext/pgsql/pgsql.c
2016-02-14 14:45:53 +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
Nikita Popov
ab74d80247 Fix bug #70487
Switch to * instead of + in zpp.
2015-09-14 15:04:43 +02:00
Nikita Popov
7c8798834a Small cleanup in pack() implementation 2015-09-09 03:58:37 +02:00