1
0
mirror of https://github.com/php/php-src.git synced 2026-04-02 13:43:02 +02:00
Files
archived-php-src/main
Christoph M. Becker 53797c206a Fix #78210: Invalid pointer address
This is actually about three distinct issues:

* If an empty string is passed as $address to `stream_socket_sendto()`,
  the `sa` is not initialized, so we must not pass it as `addr` to
  `php_stream_xport_sendto()`.

* On POSIX, `recvfrom()` truncates messages which are too long to fit
  into the specified buffer (unless `MSG_PEEK` is given), discards the
  excessive bytes, and returns the buffer length.  On Windows, the same
  happens, but `recvfrom()` returns `SOCKET_ERROR` with the error code
  `WSAEMSGSIZE`.  We have to catch this for best POSIX compatibility.

* In `php_network_parse_network_address_with_port()`, we have to zero
  `in6` (not only its alias `sa`) to properly support IPv6.

Co-Authored-By: Nikita Popov <nikita.ppv@googlemail.com>
2020-03-11 11:30:15 +01:00
..
2018-07-25 00:53:25 +02:00
2019-08-30 16:07:43 +02:00
2018-11-01 18:35:32 +02:00
2020-01-17 09:47:31 +01:00
2018-07-25 00:53:25 +02:00
2020-03-11 11:30:15 +01:00
2018-11-01 18:35:32 +02:00
2018-11-01 18:35:32 +02:00
2018-11-01 18:35:32 +02:00
2018-11-01 18:35:32 +02:00
2018-11-01 18:35:32 +02:00
2018-01-02 12:57:58 +08:00
2019-06-17 13:13:25 +02:00
2019-06-17 13:13:25 +02:00
2018-07-25 00:53:25 +02:00
2018-07-25 00:53:25 +02:00
2018-11-01 18:35:32 +02:00
2020-03-03 10:19:31 +01:00
2018-11-01 18:35:32 +02:00
2018-07-25 11:57:11 +02:00
2018-07-25 00:53:25 +02:00
2018-11-01 18:35:32 +02:00
2018-11-01 18:35:32 +02:00
2018-07-25 00:53:25 +02:00
2018-07-25 00:53:25 +02:00
2018-07-25 00:53:25 +02:00
2018-01-02 12:57:58 +08:00
2018-07-25 00:53:25 +02:00