mirror of
https://github.com/php/php-src.git
synced 2026-03-24 08:12:21 +01:00
Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2: Fix length of key passed to zend_hash_str_find_ptr
This commit is contained in:
@@ -106,7 +106,7 @@ static void init_ancillary_registry(void)
|
||||
entry.to_array = to; \
|
||||
key.cmsg_level = level; \
|
||||
key.cmsg_type = type; \
|
||||
zend_hash_str_update_mem(&ancillary_registry.ht, (char*)&key, sizeof(key) - 1, (void*)&entry, sizeof(entry))
|
||||
zend_hash_str_update_mem(&ancillary_registry.ht, (char*)&key, sizeof(key), (void*)&entry, sizeof(entry))
|
||||
|
||||
#if defined(IPV6_PKTINFO) && HAVE_IPV6
|
||||
PUT_ENTRY(sizeof(struct in6_pktinfo), 0, 0, from_zval_write_in6_pktinfo,
|
||||
@@ -156,7 +156,7 @@ ancillary_reg_entry *get_ancillary_reg_entry(int cmsg_level, int msg_type)
|
||||
tsrm_mutex_unlock(ancillary_mutex);
|
||||
#endif
|
||||
|
||||
if ((entry = zend_hash_str_find_ptr(&ancillary_registry.ht, (char*)&key, sizeof(key) - 1)) != NULL) {
|
||||
if ((entry = zend_hash_str_find_ptr(&ancillary_registry.ht, (char*)&key, sizeof(key))) != NULL) {
|
||||
return entry;
|
||||
} else {
|
||||
return NULL;
|
||||
|
||||
Reference in New Issue
Block a user