mirror of
https://github.com/bdnugget/php-src.git
synced 2026-11-29 11:55:42 +00:00
- Fixed stack buffer overflow in socket_connect().
Found by: Mateusz Kocielski, Marek Kroemeke and Filip Palian
This commit is contained in:
1 parent
331a30997a
commit
89f893a95e
1 file changed
+5
@@ -1540,6 +1540,11 @@ PHP_FUNCTION(socket_connect)
|
||||
break;
|
||||
|
||||
case AF_UNIX:
|
||||
if (addr_len >= sizeof(s_un.sun_path)) {
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Path too long", php_sock->type);
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
memset(&s_un, 0, sizeof(struct sockaddr_un));
|
||||
|
||||
s_un.sun_family = AF_UNIX;
|
||||
|
||||
Reference in new issue
Block a user