mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
Merge branch 'PHP-8.2'
* PHP-8.2: Fix uninitialized variable accesses in sockets/conversions
This commit is contained in:
commit
efdbb4715e
1 changed files with 8 additions and 1 deletions
|
@ -728,6 +728,10 @@ static void from_zval_write_sockaddr_aux(const zval *container,
|
|||
zend_llist_add_element(&ctx->keys, &node);
|
||||
from_zval_write_int(elem, (char*)&family, ctx);
|
||||
zend_llist_remove_tail(&ctx->keys);
|
||||
|
||||
if (UNEXPECTED(ctx->err.has_error)) {
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
family = ctx->sock->type;
|
||||
}
|
||||
|
@ -1123,7 +1127,10 @@ static void from_zval_write_controllen(const zval *elem, char *msghdr_c, ser_con
|
|||
* this least common denominator
|
||||
*/
|
||||
from_zval_write_uint32(elem, (char*)&len, ctx);
|
||||
if (!ctx->err.has_error && len == 0) {
|
||||
if (ctx->err.has_error) {
|
||||
return;
|
||||
}
|
||||
if (len == 0) {
|
||||
do_from_zval_err(ctx, "controllen cannot be 0");
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue