| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
* 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
|
| |
|
|
|
|
|
| |
Co-Authored-By: Nikita Popov <nikita.ppv@googlemail.com>
Co-Authored-By: Christoph M. Becker <cmbecker69@gmx.de>
|
|
|
|
|
|
| |
- More common filename accross the PHP repository
- Additionally, this patch replaces some legacy form feed (FF or ^L)
characters (for printers) to LF (\n) newline character.
|
|\ |
|
| |\ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
By avoiding integer overflow in the implementation entirely. The
multiplication was already explicitly checked for overflow, so also
add a check for the addition and remove the overflow checks after
the calculation.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
- Simplify conditions
- Use ZEND_HASH_APPLY_* instead of hard-coded booleans
- Use ZEND_NORMALIZE_BOOL
- Drop sign in favor of ZEND_NORMALIZE_BOOL
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The `<assert.h>` header file is part of the standard C89 headers [1] and
on older systems there needed to be also a manual check if header is
present.
Since PHP requires at least C89 manual check and the `HAVE_ASSERT_H`
symbol defined by Autoconf in configure.ac can be both removed [2].
This patch also removes unused <assert.h> includes where c files don't
use the `assert()` macro.
Refs:
[1] https://port70.net/~nsz/c/c89/c89-draft.html#4.2
[2] https://git.savannah.gnu.org/cgit/autoconf.git/tree/lib/autoconf/headers.m4
|
| |
| |
| |
| |
| | |
The bundled library libbcmath is maintained in the php-src and its
build system files are outdated and not used.
|
|\ \
| | |
| | |
| | |
| | | |
* pull-request/2742:
Fixed bug #66364 (BCMath bcmul ignores scale parameter)
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
We change `bcmul()` and `bcpow()` so that the result has exactly the
requested scale (i.e. decimal places) to make them consistent with the
other BCMath functions. This also changes our stance regarding bug
#52748, which had been classified as documentation problem.
We do not manipulate the numbers themselves (anymore), but rather
introduce `bc_num2str_ex()` which accepts a scale parameter that
overrides the scale of the number by omitting extraneous decimals and
adding zeros, respectively. This also allows us to get rid of
`split_bc_num()`, which fixes bug #75164 as well.
|
|\ \ \
| | | |
| | | |
| | | |
| | | | |
* pull-request/2745:
Fixed bug #75169 (BCMath errors/warnings bypass error handling)
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Instead of writing warning messages to `stderr`, we employ PHP's error
handling to raise `E_WARNING` even for the single case where
`bc_rt_error()` has been called, since that did not actually error out.
We choose to call `php_error_docref()` directly in libbcmath, since
there is no upstream, and since other PHP core functionality is already
used in our bundled libbcmath. Accordingly, we remove `rt.c` so it will
not be accidentally used in the future.
Besides adapting a few existing tests, we add new tests so that the
warnings are tested at least once. We also get rid of the Windows
specific tests, since the warning behavior is now supposed to be
platform-agnostic.
|
|\ \ \ \
| |/ / /
|/| | /
| | |/
| |/| |
* PHP-7.2:
Fixed bug #46781 (BC math handles minus zero incorrectly)
|
| |\ \
| | | |
| | | |
| | | |
| | | | |
* PHP-7.1:
Fixed bug #46781 (BC math handles minus zero incorrectly)
|
| | |\ \
| | | | |
| | | | |
| | | | |
| | | | | |
* PHP-7.0:
Fixed bug #46781 (BC math handles minus zero incorrectly)
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Actually, there is no negative zero at all. We obey Postel's law, and
still accept negative zeroes, but we store them as positive zeroes
after the conversion from string, i.e. we normalize before further
processing.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
There's no need to use a division by one to truncate to zero scale;
instead we introduce and use `_bc_truncate()`, what is more efficient.
|
|\ \ \ \ \
| |/ / / /
| | | | /
| |_|_|/
|/| | | |
* PHP-7.2:
Fixed bug #75178 (bcpowmod() misbehaves for non-integer base or modulus)
|
| |\ \ \
| | |/ /
| | | |
| | | |
| | | | |
* PHP-7.1:
Fixed bug #75178 (bcpowmod() misbehaves for non-integer base or modulus)
|
| | |\ \
| | | |/
| | | |
| | | |
| | | | |
* PHP-7.0:
Fixed bug #75178 (bcpowmod() misbehaves for non-integer base or modulus)
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Since `bcpowmod()` does not support non-integral operands, we have to
truncate these in addition to emitting a respective warning. We also
have to work with the truncated values in the following.
We recognize that the division by one to enforce the truncation is
actually overkill, but we stick with it for now, and shall tackle the
issue for PHP 7.3.
|
|/ / /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The `n_next` member of struct `bc_struct` is unused; the only code that
would use this member has been disabled since libbcmath has been
bundled nearly 17 years ago. Apparently, `n_next` has been designed to
build a linked list of free numbers, but it is doubtful whether that
would be an improvement over relying on the efficiency of the ZendMM,
so we remove the remaining support altogether.
The ABI break probably affects nobody, but would be okay for a new
minor version according to our release process, anyway.
|
|\ \ \
| |/ /
| | |
| | |
| | | |
* PHP-7.1:
Fixed bug #54598 (bcpowmod() may return 1 if modulus is 1)
|
| |\ \
| | |/
| | |
| | |
| | | |
* PHP-7.0:
Fixed bug #54598 (bcpowmod() may return 1 if modulus is 1)
|
| | |
| | |
| | |
| | |
| | | |
`x mod 1` is always zero; we have to take the scale into account,
though.
|
|\ \ \
| |/ /
| | |
| | |
| | | |
* PHP-7.1:
Fixed bug #44995 (bcpowmod() fails if scale != 0)
|
| |\ \
| | |/
| | |
| | |
| | | |
* PHP-7.0:
Fixed bug #44995 (bcpowmod() fails if scale != 0)
|
| | |
| | |
| | |
| | |
| | | |
`bc_divmod()` is supposed to do integer division, so we must not apply
a scale factor here.
|
|\ \ \
| |/ /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* PHP-7.1:
Fixed condition check
Fixed condition check
another place
Conflicts:
ext/mcrypt/mcrypt.c
|
| |\ \
| | |/
| | |
| | |
| | | |
* PHP-7.0:
Fixed condition check
|
| | | |
|
| | | |
|
|/ / |
|
|\ \
| |/
| |
| |
| | |
* PHP-7.0:
use zend_error instead of zend_error_noreturn
|
| |\
| | |
| | |
| | |
| | | |
* PHP-5.6:
use zend_error instead of zend_error_noreturn
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | | |
(cherry picked from commit 40e7baab3c90001beee4c8f0ed0ef79ad18ee0d6)
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* PHP-7.0:
Fix bug #73190: memcpy negative parameter _bc_new_num_ex
(cherry picked from commit af1bf873fe4fc70be17fa9f270e8f30666f2d2db)
|
|/ / |
|
| |
| |
| |
| | |
semantick changes).
|
| | |
|
| | |
|
| | |
|
|/ |
|