php-src/ext/sockets
Niels Dossche b8755a7559 Fix uninitialized variable accesses in sockets/conversions
This was first pointed out in GH-10959.
The from_zval_... functions don't always write to the pointer, in particular
it is necessary to check for an error before using the value. Otherwise
we can access an uninitialized value and that's UB (and dangerous).

Note: this does *NOT* get rid of the compiler warning. Even though there
is error checking now, the compiler isn't smart enough to figure out
that the values can not be used uninitialized.

Closes GH-10966.
2023-03-29 19:44:30 +02:00
..
tests Merge branch 'PHP-8.0' into PHP-8.1 2022-09-30 17:08:17 +01:00
config.m4 Fix GH-7978: sockets extension compilation errors 2022-01-21 23:56:56 +01:00
config.w32 Fix Windows build for shared ext/sockets 2020-09-08 22:54:21 +02:00
conversions.c Fix uninitialized variable accesses in sockets/conversions 2023-03-29 19:44:30 +02:00
conversions.h
CREDITS
multicast.c Merge branch 'PHP-8.0' into PHP-8.1 2022-01-04 14:12:56 +01:00
multicast.h Update http->https in license (#6945) 2021-05-06 12:16:35 +02:00
php_sockets.h Update http->https in license (#6945) 2021-05-06 12:16:35 +02:00
sendrecvmsg.c Merge branch 'PHP-8.0' into PHP-8.1 2022-06-09 13:49:45 -04:00
sendrecvmsg.h
sockaddr_conv.c Merge branch 'PHP-8.0' into PHP-8.1 2022-05-22 23:27:47 +02:00
sockaddr_conv.h
sockets_arginfo.h Add more specific array return type hints for various extensions - part 6 (#7474) 2021-10-07 14:29:29 +02:00
sockets.c Merge branch 'PHP-8.0' into PHP-8.1 2022-10-01 11:23:34 +02:00
sockets.stub.php Add more specific array return type hints for various extensions - part 6 (#7474) 2021-10-07 14:29:29 +02:00
unix_socket_constants.h Update http->https in license (#6945) 2021-05-06 12:16:35 +02:00
win32_socket_constants.h Update http->https in license (#6945) 2021-05-06 12:16:35 +02:00
windows_common.h Update http->https in license (#6945) 2021-05-06 12:16:35 +02:00