Skip to content

Commit 9d2dc1e

Browse files
committed
Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0: Avoid void* arithmetic in sockets/multicast.c on NetBSD
2 parents d37c496 + 3f0bb67 commit 9d2dc1e

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

Diff for: NEWS

+3
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,9 @@ PHP NEWS
4747
- PDO_PGSQL:
4848
. Fixed error message allocation of PDO PgSQL. (SATO Kentaro)
4949

50+
- Sockets:
51+
. Avoid void* arithmetic in sockets/multicast.c on NetBSD. (David Carlier)
52+
5053
- Spl:
5154
. Fixed bug #75917 (SplFileObject::seek broken with CSV flags). (Aliaksandr
5255
Bystry)

Diff for: Zend/zend_cpuinfo.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ static void __zend_cpuid(uint32_t func, uint32_t subfunc, zend_cpu_info *cpuinfo
7575

7676
#if defined(__i386__) || defined(__x86_64__)
7777
/* Function based on compiler-rt implementation. */
78-
static unsigned get_xcr0_eax() {
78+
static unsigned get_xcr0_eax(void) {
7979
# if defined(__GNUC__) || defined(__clang__)
8080
// Check xgetbv; this uses a .byte sequence instead of the instruction
8181
// directly because older assemblers do not include support for xgetbv and
@@ -90,7 +90,7 @@ static unsigned get_xcr0_eax() {
9090
# endif
9191
}
9292

93-
static bool is_avx_supported() {
93+
static bool is_avx_supported(void) {
9494
if (!(cpuinfo.ecx & ZEND_CPU_FEATURE_AVX)) {
9595
/* No support for AVX */
9696
return 0;

Diff for: ext/sockets/multicast.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -784,7 +784,7 @@ int php_add4_to_if_index(struct in_addr *addr, php_socket *php_sock, unsigned *i
784784
}
785785

786786
for (p = if_conf.ifc_buf;
787-
p < if_conf.ifc_buf + if_conf.ifc_len;
787+
p < ((char *)if_conf.ifc_buf) + if_conf.ifc_len;
788788
p += entry_len) {
789789
/* p may be misaligned on macos. */
790790
struct ifreq cur_req;

0 commit comments

Comments
 (0)