Commit Graph

136 Commits

Author SHA1 Message Date
twosee
6e92487f66 Fix warnings of strict-prototypes
Closes GH-5887.
2020-07-23 00:59:00 +08:00
twosee
88355dd338 Constify char * arguments of APIs
Closes GH-5676.
2020-06-08 10:38:45 +02:00
Máté Kocsis
afdaa91170
Fix #78880: Final spelling fixes 2020-01-16 19:14:31 +01:00
Máté Kocsis
c3cf01b553
Fix #78880: Yet another batch of spelling errors 2020-01-16 12:04:00 +01:00
Máté Kocsis
0b4778c377
Fix #78880: Another bunch of spelling errors 2020-01-16 09:46:47 +01:00
Christoph M. Becker
5d3be966f9 Use proper printf() specifiers 2020-01-15 18:18:36 +01:00
Stanislav Malyshev
d9f57e8316 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fixed bug #78910
  Fix #78878: Buffer underflow in bc_shift_addsub
  Fix test
  Fix #78862: link() silently truncates after a null byte on Windows
  Fix #78863: DirectoryIterator class silently truncates after a null byte
  Fix #78943: mail() may release string with refcount==1 twice
2019-12-16 00:39:37 -08:00
Christoph M. Becker
518a160b65 Fix #78943: mail() may release string with refcount==1 twice
Since we need `headers_lc` as well as `headers_trim` in the following,
we do not release the former even if they are the same string, to avoid
complicating the release logic even more.

A new test case is not necessary, since we already have
mail_basic_alt2-win32.phpt and others.
2019-12-15 13:13:30 -08:00
Sebastian Jennen
a2b2aaa67a file encoding cleanup: remove bom in win32 files
These two files have been: "UTF-8 Unicode (with BOM) text".
By applying `dos2unix` on these files the BOM has been removed.

I checked the whole source code with dos2unix:
These were the only two text files affected.
2019-07-27 10:12:54 +02:00
Peter Kokot
9219e56063 Remove redundant memory.h file
The memory.h file is part of the pre-C89 era and is on today's systems
only a simple wrapper for including the final string.h header file.
2019-05-11 19:47:54 +02:00
Stanislav Malyshev
f7d59844e1 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #77821: Potential heap corruption in TSendMail()
2019-04-29 22:09:15 -07:00
Stanislav Malyshev
506a764089 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix #77821: Potential heap corruption in TSendMail()
2019-04-29 22:09:10 -07:00
Stanislav Malyshev
2c3933821f Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fix #77821: Potential heap corruption in TSendMail()
2019-04-29 22:09:04 -07:00
Christoph M. Becker
6c631ccfef Fix #77821: Potential heap corruption in TSendMail()
`zend_string_tolower()` returns a copy (not a duplicate) of the given
string, if it is already in lower case.  In this case we must not not
`zend_string_free()` both strings.  The cleanest solution is to call
` zend_string_release()` on both strings, which properly handles the
refcount.
2019-04-29 22:08:19 -07: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
Gabriel Caruso
84b195d9fc Fix some misspellings 2018-08-12 16:15:45 +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
Anatol Belski
3e1e3ab728 Remove conflicting declaration 2018-07-09 12:32:45 +02: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
Gabriel Caruso
2d48d734a2 Fix some misspellings 2018-02-06 16:59:00 +01:00
Kalle Sommer Nielsen
ffbe801226 PCRE is always available, PHP can't be built without it anyway so these checks makes no sense anymore 2017-11-25 00:40:13 +01:00
Anatol Belski
a5bc5aed71 Patch core for PCRE2 support
RFC https://wiki.php.net/rfc/pcre2-migration
2017-11-13 19:37:38 +01:00
Joe Watkins
8d5a5fbf6b
Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  minor loop optimizations, closes #2633
2017-07-25 06:54:20 +01:00
Joe Watkins
69b48f83df
minor loop optimizations, closes #2633 2017-07-25 06:47:58 +01:00
Dmitry Stogov
71daef93bc preg_replace() optimization 2017-06-07 13:50:16 +03:00
Anatol Belski
83d8daef97 Merge branch 'PHP-7.1'
* PHP-7.1:
  Fixed bug #74510 win32/sendmail.c anchors CC header but not BCC
2017-05-02 12:33:26 +02:00
Anatol Belski
20a608d9da Fixed bug #74510 win32/sendmail.c anchors CC header but not BCC 2017-05-02 12:31:00 +02:00
Nikita Popov
edcabf6d07 Drop unnecessary allocator return value checks 2017-03-13 22:07:15 +01:00
Anatol Belski
fa0df0cdc5 Merge branch 'PHP-7.1'
* PHP-7.1:
  fix possible NULL dereference
2017-02-01 13:46:50 +01:00
Anatol Belski
8dfa428ccd fix possible NULL dereference 2017-02-01 13:43:33 +01:00
Anatol Belski
df85e1fffd Merge branch 'PHP-7.1'
* PHP-7.1:
  remove unused var
  use zend_string API
  Fixed bug #74005 mail.add_x_header causes RFC-breaking lone line feed
2017-02-01 12:58:47 +01:00
Anatol Belski
15404bda13 remove unused var 2017-02-01 12:49:32 +01:00
Anatol Belski
2cd0d8b711 use zend_string API 2017-02-01 12:45:19 +01:00
Anatol Belski
ec43a11581 Fixed bug #74005 mail.add_x_header causes RFC-breaking lone line feed 2017-02-01 12:36:14 +01:00
Anatol Belski
5a9742e34b Merge branch 'PHP-7.1'
* PHP-7.1:
  add a primitive debug facility to sendmail
2017-01-31 18:29:47 +01:00
Anatol Belski
163bb87897 add a primitive debug facility to sendmail 2017-01-31 18:25:36 +01: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
Anatol Belski
0562ec85df Fix bug #70145 From field incorrectly parsed from headers 2015-08-19 11:05:35 +02:00
Anatol Belski
7d41afeee8 fix thread safety 2015-07-29 10:36:27 +02:00
Dmitry Stogov
4bd22cf1c1 Improved zend_string API (Francois Laupretre)
Squashed commit of the following:

commit d96eab8d79
Author: Francois Laupretre <francois@tekwire.net>
Date:   Fri Jun 26 01:23:31 2015 +0200

    Use the new 'ZSTR' macros in the rest of the code.

    Does not change anything to the generated code (thanks to compat macros) but cleaner.

commit b352643910
Author: Francois Laupretre <francois@tekwire.net>
Date:   Thu Jun 25 13:45:06 2015 +0200

    Improve zend_string API

    Add missing methods
2015-06-29 16:44:54 +03:00
Anatol Belski
a6190359ad add vim modelines 2015-05-20 19:14:05 +02:00
Anatol Belski
2841aa95db fix thread safety for win32/sendmail 2015-03-03 20:42:28 +01:00
Anatol Belski
82fd62df19 avoid this pointers play 2015-03-03 19:30:15 +01:00
Anatol Belski
2f79fd8d43 use correct free api 2015-03-03 18:09:28 +01:00
Anatol Belski
cddde315c7 Fixed bug #69154 Access violation in php7.dll!_emalloc
one more invalid free
2015-03-03 17:19:17 +01:00
Anatol Belski
74813e6f04 fix socket leaking and better connection err check 2015-03-03 17:19:15 +01:00
Anatol Belski
30830bcefd Fixed bug #69115 crash in mail
There were two issues

- php_pcre_replace could be used directly and sbject_str could be NULL
- the Windows sendmail variant was freeing something passed from the outside
2015-02-27 10:42:20 +01:00
Dmitry Stogov
4241a090ad Avoid reallocation in preg_replace() if nothing was replaced 2015-02-10 13:30:25 +03:00
Anatol Belski
ea689b96a7 cleanup 2015-01-16 11:40:14 +01:00
matbech
27efc2b2ce Bug fix for wrong regex in mail
The wrong string PHP_WIN32_MAIL_UNIFY_REPLACE instead of PHP_WIN32_MAIL_UNIFY_PATTERN is used for the regex.
2015-01-15 15:07:10 +01:00