1
0
mirror of https://github.com/php/php-src.git synced 2026-04-15 12:01:07 +02:00
Commit Graph

1630 Commits

Author SHA1 Message Date
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
03f3b8479b Sync leading and final newlines in source code files
This patch adds missing newlines, trims multiple redundant final
newlines into a single one, and trims redundant leading newlines.

According to POSIX, a line is a sequence of zero or more non-' <newline>'
characters plus a terminating '<newline>' character. [1] Files should
normally have at least one final newline character.

C89 [2] and later standards [3] mention a final newline:
"A source file that is not empty shall end in a new-line character,
which shall not be immediately preceded by a backslash character."

Although it is not mandatory for all files to have a final newline
fixed, a more consistent and homogeneous approach brings less of commit
differences issues and a better development experience in certain text
editors and IDEs.

[1] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206
[2] https://port70.net/~nsz/c/c89/c89-draft.html#2.1.1.2
[3] https://port70.net/~nsz/c/c99/n1256.html#5.1.1.2
2018-10-14 12:51:01 +02:00
Peter Kokot
7f6387b59a Trim trailing whitespace in source code files 2018-10-13 14:12:55 +02:00
Peter Kokot
3f72c77ce4 Convert CRLF line endings to LF
This patch simplifies line endings tracked in the Git repository and
syncs them to all include the LF style instead of the CRLF files.

Newline characters:
- LF (\n) (*nix and Mac)
- CRLF (\r\n) (Windows)
- CR (\r) (old Mac, obsolete)

To see which line endings are in the index and in the working copy the
following command can be used:
`git ls-files --eol`

Git additionally provides `.gitattributes` file to specify if some files
need to have specific line endings on all platforms (either CRLF or LF).

Changed files shouldn't cause issues on modern Windows platforms because
also Git can do output conversion is core.autocrlf=true is set on
Windows and use CRLF newlines in all files in the working tree.

Unless CRLF files are tracked specifically, Git by default tracks all
files in the index using LF newlines.
2018-10-13 11:21:27 +02:00
Anatol Belski
be02b2e8fd Add spectre switch for suitable vc14 versions 2018-09-18 10:43:52 +02:00
Anatol Belski
d77ac7b3dc Sync version for vc++ 15.9 2018-09-13 19:25:23 +02:00
Dylan K. Taylor
b9bf9ddce6 mkdist.php: recursively check dll dependencies
Fix duplication of recursively checked deps
2018-08-23 21:25:54 +02:00
Anatol Belski
99fe18503a Fixed RecursiveDirectoryIterator with long path or with edge case length
The search path needs to be appended with the wild card. Till now, an
edge case existed, so then if a path is 259 bytes long, which is smaller
_MAX_PATH, the suffix would cause the final search path to become longer
than _MAX_PATH. It is an edge case, when the starting path happens to
have a specific length. If the starting path was longer than _MAX_PATH
or the addition of "\\*" would not exceed _MAX_PATH, the function was
correct. Except for rewind, which was broken in the case of the long
path.
2018-07-12 19:49:32 +02:00
Anatol Belski
cc7b000d2c Fix macro 2018-07-12 11:35:00 +02:00
Anatol Belski
98102648cb Fix condition
It looks like the real length limit is 247 bytes, not 248 as documented.
2018-07-11 13:09:20 +02:00
Anatol Belski
246cb03e26 Fix event log handling in startup phase
The log header can be saved in the globals on startup. At the same
time, the log header can be changed per request. In case that
happened, wrong pointer will be free'd on shutdown. It can happen at
any point when zend_error() or similar is called at startup, like for
example in the case of the ini deprecation warnings. Thus, ZMM cannot
be used here.
2018-07-06 16:07:28 +02:00
Anatol Belski
f8258325b4 Update libs_version.txt 2018-07-02 12:09:54 +02:00
Anatol Belski
88b5df91f6 Sync versions for VC++ 15.8 2018-06-28 13:23:19 +02:00
Anatol Belski
5bf8032112 Translate correct C++ version with suitable compiler 2018-05-28 17:12:06 +02:00
Anatol Belski
cdf72523f3 Update libs_versions.txt 2018-03-27 19:44:17 +02:00
Anatol Belski
5b2c30d7e6 Fix phpize build when DEFINE() is involved 2018-03-26 13:33:55 +02:00
Anatol Belski
84f565ec71 Sync version for VC++ 15.7 2018-03-25 12:59:15 +02:00
Anatol Belski
4dd1be2079 Provide core includes for the resource compiler by default 2018-03-12 14:14:34 +01:00
Anatol Belski
00bfc6eb49 Exclude /Qspectre for clang analyzer 2018-03-07 12:34:16 +01:00
Anatol Belski
ef04bc4a51 dos2unix 2018-02-20 07:59:34 +01:00
Anatol Belski
08b4f3c745 Use more jobs with cppcheck 2018-02-19 11:27:03 +01:00
Anatol Belski
1368aea352 Finer conditions, so /Qspectre is already usable with latest vc15 2018-02-05 10:38:06 +01:00
Anatol Belski
043d53c789 Add switches for Spectre variant 1 mitigation 2018-01-17 14:33:08 +01:00
Anatol Belski
089a3213ae Sync for upcoming vc++ 15.6 version raise 2018-01-14 16:38:36 +01:00
Lior Kaplan
fbfdd1e1c4 Happy new year (Update copyright to 2018) 2018-01-02 23:42:29 +02:00
Xinchen Hui
ccd4716ec7 year++ 2018-01-02 12:53:31 +08:00
Anatol Belski
4c0af1fbd4 Fixed bug #75679 Path 260 character problem 2017-12-14 16:16:50 +01:00
Anatol Belski
f749448fc6 Sync known vc++ versions in 7.1 2017-12-11 14:13:38 +01:00
Anatol Belski
ffd94f9bf8 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Consider Xdebug for tmi ini generation, too
2017-12-01 16:02:38 +01:00
Anatol Belski
958fdc997c Consider Xdebug for tmi ini generation, too 2017-12-01 16:01:34 +01:00
Anatol Belski
34b19387c2 Fix normalized path length calculation and error handling 2017-11-27 12:32:19 +01:00
Anatol Belski
c94d091889 Regenerate cp map
Add missing encoding name and don't put nameless cp
2017-11-15 11:17:30 +01:00
Anatol Belski
91c7460c53 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Update libs_version.txt
2017-11-02 22:44:27 +01:00
Anatol Belski
c3be49e07d Update libs_version.txt 2017-11-02 22:41:12 +01:00
Anatol Belski
ba50b27284 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Yet one /nologo
2017-11-02 09:22:25 +01:00
Anatol Belski
f5358c0e23 Yet one /nologo 2017-11-02 09:21:22 +01:00
Anatol Belski
98422cfa3d Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fix year
  Add /nologo
2017-10-31 10:35:59 +01:00
Anatol Belski
8a3e2a6b14 Fix year 2017-10-31 10:25:15 +01:00
Anatol Belski
164167f3da Add /nologo 2017-10-31 10:24:34 +01:00
Anatol Belski
8ad4de887f Don't create plist files when using clang analyzer 2017-10-25 18:06:56 +02:00
Anatol Belski
30f121f9bc Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fix re2c version detection
2017-10-10 12:59:14 +02:00
Anatol Belski
d1fc9b425f Fix re2c version detection 2017-10-10 10:52:52 +02:00
Anatol Belski
dc3b9fe619 Fix ftok() multibyte path support 2017-10-09 13:12:40 +02:00
Anatol Belski
72c008f945 Fix mkdir() special case for path length < 260 and > 248 2017-09-28 13:18:31 +02:00
Anatol Belski
e3e3d37fa9 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Update lib_versions.txt
2017-09-18 09:36:29 +02:00
Anatol Belski
7670590efd Update lib_versions.txt 2017-09-18 09:34:58 +02:00
Anatol Belski
296d0826da Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fix command
2017-09-02 16:58:44 +02:00
Anatol Belski
24da62d342 Fix command 2017-09-02 16:56:52 +02:00
Anatol Belski
db78eff4c9 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Make for exclusion per regex
2017-08-31 23:57:36 +02:00
Anatol Belski
a86df6bcb0 Make for exclusion per regex 2017-08-31 23:56:42 +02:00