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)
1823
1823
break ;
1824
1824
}
1825
1825
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 ) {
1829
1827
zval_ptr_dtor (& obj );
1830
1828
zend_string_efree (recv_buf );
1831
1829
zend_value_error ("invalid ipv6 frame buffer length" );
1832
1830
RETURN_THROWS ();
1833
1831
}
1834
1832
struct ipv6hdr ip ;
1835
1833
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 ));
1836
1836
size_t totalip = sizeof (ip ) + ip .payload_len ;
1837
1837
if (totalip > ether_hdr_buf .buf_len ) {
1838
1838
zval_ptr_dtor (& obj );
1839
1839
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 );
1841
1841
RETURN_THROWS ();
1842
1842
}
1843
1843
char s [INET6_ADDRSTRLEN ], d [INET6_ADDRSTRLEN ];
You can’t perform that action at this time.
0 commit comments