File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -1392,12 +1392,13 @@ PHP_FUNCTION(socket_recvfrom)
1392
1392
zval_dtor (arg2 );
1393
1393
zval_dtor (arg5 );
1394
1394
1395
- ZVAL_STRING (arg2 , recv_buf , 0 );
1395
+ ZVAL_STRINGL (arg2 , recv_buf , retval , 0 );
1396
1396
ZVAL_STRING (arg5 , s_un .sun_path , 1 );
1397
1397
break ;
1398
1398
1399
1399
case AF_INET :
1400
1400
slen = sizeof (sin );
1401
+ memset (& sin , 0 , slen );
1401
1402
sin .sin_family = AF_INET ;
1402
1403
1403
1404
if (arg6 == NULL ) {
@@ -1418,7 +1419,7 @@ PHP_FUNCTION(socket_recvfrom)
1418
1419
1419
1420
address = inet_ntoa (sin .sin_addr );
1420
1421
1421
- ZVAL_STRING (arg2 , recv_buf , 0 );
1422
+ ZVAL_STRINGL (arg2 , recv_buf , retval , 0 );
1422
1423
ZVAL_STRING (arg5 , address ? address : "0.0.0.0" , 1 );
1423
1424
ZVAL_LONG (arg6 , ntohs (sin .sin_port ));
1424
1425
break ;
You can’t perform that action at this time.
0 commit comments