History log of /PHP-8.2/ext/standard/streamsfuncs.c (Results 1 – 25 of 372)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# ba909d7c 22-Jul-2024 David Carlier

Fix GH-14780: p(f)sockopen overflow on timeout argument.

close GH-14785


# fdcfd62b 22-Jul-2024 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Fix passing non-finite timeout values in stream functions

Closes GH-15061.


# ab3f584a 03-May-2023 nielsdos <7771979+nielsdos@users.noreply.github.com>

Merge branch 'PHP-8.1' into PHP-8.2

* PHP-8.1:
Fix GH-11178: Segmentation fault in spl_array_it_get_current_data (PHP 8.1.18)
Fix GH-11175 and GH-11177: Stream socket timeout und

Merge branch 'PHP-8.1' into PHP-8.2

* PHP-8.1:
Fix GH-11178: Segmentation fault in spl_array_it_get_current_data (PHP 8.1.18)
Fix GH-11175 and GH-11177: Stream socket timeout undefined behaviour
Fix GH-9068: Conditional jump or move depends on uninitialised value(s)

show more ...


# d75c1d00 02-May-2023 nielsdos <7771979+nielsdos@users.noreply.github.com>

Fix GH-11175 and GH-11177: Stream socket timeout undefined behaviour

A negative value like -1 may overflow and cause incorrect results in the
timeout variable, which causes an immediate

Fix GH-11175 and GH-11177: Stream socket timeout undefined behaviour

A negative value like -1 may overflow and cause incorrect results in the
timeout variable, which causes an immediate timeout. As this is caused
by undefined behaviour the exact behaviour depends on the compiler, its
version, and the platform.

A large overflow is also possible, if an extremely large timeout value
is passed we also set an indefinite timeout. This is because the timeout
value is at least a 64-bit number and waiting for UINT64_MAX/1000000
seconds is waiting about 584K years.

Closes GH-11183.

show more ...

# 3032a68b 20-Mar-2023 Ilija Tovilo

Merge branch 'PHP-8.1' into PHP-8.2

* PHP-8.1:
Fix GH-10885: Leaking stream_socket_server context


# 122f1287 20-Mar-2023 Ilija Tovilo

Fix GH-10885: Leaking stream_socket_server context

`php_stream_context_set` already increases the refcount.

Closes GH-10886

# 246d13cd 01-Oct-2022 Arnaud Le Blanc

Merge branch 'PHP-8.1' into PHP-8.2

* PHP-8.1:
[ci skip] NEWS
[ci skip] NEWS
Return immediately when FD_SETSIZE is exceeded (#9602)


# d4b99542 01-Oct-2022 Arnaud Le Blanc

Merge branch 'PHP-8.0' into PHP-8.1

* PHP-8.0:
[ci skip] NEWS
Return immediately when FD_SETSIZE is exceeded (#9602)


# 80232de0 01-Oct-2022 Arnaud Le Blanc

Return immediately when FD_SETSIZE is exceeded (#9602)

# 33dae4bc 19-Jul-2022 Christoph M. Becker

Merge branch 'PHP-8.1'

* PHP-8.1:
Fix GH-9017: php_stream_sock_open_from_socket could return NULL


# 32d55f74 19-Jul-2022 Christoph M. Becker

Merge branch 'PHP-8.0' into PHP-8.1

* PHP-8.0:
Fix GH-9017: php_stream_sock_open_from_socket could return NULL


# 3b7babf9 15-Jul-2022 Heiko Weber

Fix GH-9017: php_stream_sock_open_from_socket could return NULL

Closes GH-9020.

# 5171cb43 20-May-2020 George Peter Banyard

Fix [-Wundef] warnings in standard extension

# 90b7bde6 03-Nov-2021 Dmitry Stogov

Use more compact representation for packed arrays.

- for packed arrays we store just an array of zvals without keys.
- the elements of packed array are accessible throuf as ht->arPacked[

Use more compact representation for packed arrays.

- for packed arrays we store just an array of zvals without keys.
- the elements of packed array are accessible throuf as ht->arPacked[i]
instead of ht->arData[i]
- in addition to general ZEND_HASH_FOREACH_* macros, we introduced similar
familied for packed (ZEND_HASH_PACKED_FORECH_*) and real hashes
(ZEND_HASH_MAP_FOREACH_*)
- introduced an additional family of macros to access elements of array
(packed or real hashes) ZEND_ARRAY_ELEMET_SIZE, ZEND_ARRAY_ELEMET_EX,
ZEND_ARRAY_ELEMET, ZEND_ARRAY_NEXT_ELEMENT, ZEND_ARRAY_PREV_ELEMENT
- zend_hash_minmax() prototype was changed to compare only values

Because of smaller data set, this patch may show performance improvement
on some apps and benchmarks that use packed arrays. (~1% on PHP-Parser)

TODO:
- sapi/phpdbg needs special support for packed arrays (WATCH_ON_BUCKET).
- zend_hash_sort_ex() may require converting packed arrays to hash.

show more ...

# 54ef4f75 01-Nov-2021 Nikita Popov

Merge branch 'PHP-8.1'

* PHP-8.1:
Accept null and 0 for microseconds argument in stream_select()


# a4ed1716 27-Oct-2021 Damjan Cvetko

Accept null and 0 for microseconds argument in stream_select()

PHP 8.0 did not accept null for the usec argument, PHP 8.1 only
accepts null. This means you can't easily write code compat

Accept null and 0 for microseconds argument in stream_select()

PHP 8.0 did not accept null for the usec argument, PHP 8.1 only
accepts null. This means you can't easily write code compatible
with both without triggering at least a deprecation warning.
Drop the deprecation warning for now.

Closes GH-7617.

show more ...

# 3240a747 17-Sep-2021 George Peter Banyard

Use more specific return type for stream functions

Some void, some zend_result, some bool

# 7bc0dd21 02-Jul-2021 Nikita Popov

Merge branch 'PHP-8.0'

* PHP-8.0:
Add missing error condition to stream_context_set_option()


# 1b01bf3a 02-Jul-2021 Nikita Popov

Add missing error condition to stream_context_set_option()

Previously this caused a null pointer dereference if the value
argument was not provided.

# 2389ac22 28-May-2021 twosee

Merge branch 'PHP-8.0'

* PHP-8.0:
Fix argument index in stream_select()


# b751c24e 28-May-2021 twosee

Fix argument index in stream_select()

Closes GH-7067.

# 01b3fc03 06-May-2021 KsaR

Update http->https in license (#6945)

1. Update: http://www.php.net/license/3_01.txt to https, as there is anyway server header "Location:" to https.
2. Update few license 3.0 to 3.01 as

Update http->https in license (#6945)

1. Update: http://www.php.net/license/3_01.txt to https, as there is anyway server header "Location:" to https.
2. Update few license 3.0 to 3.01 as 3.0 states "php 5.1.1, 4.1.1, and earlier".
3. In some license comments is "at through the world-wide-web" while most is without "at", so deleted.
4. fixed indentation in some files before |

show more ...

# 59d5b3dd 22-Apr-2021 Niklas Keller

Accept null for microseconds argument in stream_select() (#6879)

The deprecation of passing null is thrown otherwise.

If the timeout is calculated conditionally before calling strea

Accept null for microseconds argument in stream_select() (#6879)

The deprecation of passing null is thrown otherwise.

If the timeout is calculated conditionally before calling stream_select(), passing to avoid the deprecation seems unreasonable, example:

https://github.com/amphp/amp/blob/7d4bbc6e0b47c6bb39b6cce1a4b5942e0c5125fb/lib/Loop/NativeDriver.php#L286

Also enforce that if $seconds is null, then $microseconds should be null as well. However 0 is still accepted (with deprecation) for backwards compatibility.

show more ...

# c732ab40 16-Mar-2021 Dmitry Stogov

Change Zend Stream API to use zend_string* instead of char*.

This allows to eliminate re-calculation of string lenght and hash value.
See the detailed list of changes in UPGRADING.INTERN

Change Zend Stream API to use zend_string* instead of char*.

This allows to eliminate re-calculation of string lenght and hash value.
See the detailed list of changes in UPGRADING.INTERNALS.

show more ...

# eea4aac1 01-Feb-2021 Christoph M. Becker

Merge branch 'PHP-8.0'

* PHP-8.0:
Fix #80654: file_get_contents() maxlen fails above (2**31)-1 bytes


12345678910>>...15