File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -1823,21 +1823,21 @@ PHP_FUNCTION(socket_recvfrom)
18231823 break ;
18241824 }
18251825 case ETH_P_IPV6 : {
1826- struct php_socket_chunk ip_hdr_buf ;
1827- memcpy (& ip_hdr_buf , & ether_hdr_buf , sizeof (struct php_socket_chunk ));
1828- if (php_socket_get_chunk (& ip_hdr_buf , & raw_buf , ETH_HLEN , sizeof (struct ipv6hdr )) == FAILURE ) {
1826+ if (php_socket_get_chunk (& ether_hdr_buf , & raw_buf , ETH_HLEN , sizeof (struct ipv6hdr )) == FAILURE ) {
18291827 zval_ptr_dtor (& obj );
18301828 zend_string_efree (recv_buf );
18311829 zend_value_error ("invalid ipv6 frame buffer length" );
18321830 RETURN_THROWS ();
18331831 }
18341832 struct ipv6hdr ip ;
18351833 memcpy (& ip , ether_hdr_buf .buf , sizeof (ip ));
1834+ struct php_socket_chunk ip_hdr_buf ;
1835+ memcpy (& ip_hdr_buf , & ether_hdr_buf , sizeof (struct php_socket_chunk ));
18361836 size_t totalip = sizeof (ip ) + ip .payload_len ;
18371837 if (totalip > ether_hdr_buf .buf_len ) {
18381838 zval_ptr_dtor (& obj );
18391839 zend_string_efree (recv_buf );
1840- zend_value_error ("invalid ipv6 payload length" );
1840+ zend_value_error ("invalid ipv6 payload length %ld %ld" , totalip , ether_hdr_buf . buf_len );
18411841 RETURN_THROWS ();
18421842 }
18431843 char s [INET6_ADDRSTRLEN ], d [INET6_ADDRSTRLEN ];
You can’t perform that action at this time.
0 commit comments