PHP contained two different off-by-one errors, which are fixed here. First,
it created a buffer of size HOST_NAME_MAX, not adding space for a null
terminator. Second, it subtracted 1 from the size of that buffer when passing
its size to gethostname(), despite gethostname() expecting it to be a buffer
size including space for a terminating null byte, not a string length.
The WDDX specification[1] requires to serialize floats with a decimal
point, but `snprintf()` is locale-dependent and may use a decimal
comma. We fix that afterwards by replacing an eventual comma with a
point.
[1] <http://xml.coverpages.org/wddx0090-dtd-19980928.txt>
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.
fixes https://bugs.php.net/bug.php?id=74125
This commit makes the cURL config script aware of debian/ubuntu
[multiarch support][1] which installs architecture specific
headers in a different location.
It checks whether the `dpkg-architecture` script exists and is
executeable, if that is the case, the multiarch architecture is
detected by calling `dpkg-architecture -qDEB_HOST_MULTIARCH` as
documented in [debian multiarch implementation docs][2]:
> `/usr/include/<triplet>`: used for arch-varying headers
[1]: https://wiki.debian.org/Multiarch
[2]: https://wiki.debian.org/Multiarch/Implementation
The HTML decoding filter uses the `opaque` member of mbfl_convert_filter
as buffer, but there was no copy constructor defined, what caused double
frees when the filter is copied (what happens multiple times in mb_strcut(),
for instance).
This patch fixes configure error on some systems such as Alpine.
```
line 3472: test: =: unary operator expected
```
One of the fixes has been suggested also here already:
https://bugs.php.net/bug.php?id=39835
Thank you for considering merging this.