Skip to content

Commit f5b9cc4

Browse files
committed
Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3: Fix length of key passed to zend_hash_str_find_ptr
2 parents 6dea11a + 33e556f commit f5b9cc4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ext/sockets/sendrecvmsg.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ static void init_ancillary_registry(void)
106106
entry.to_array = to; \
107107
key.cmsg_level = level; \
108108
key.cmsg_type = type; \
109-
zend_hash_str_update_mem(&ancillary_registry.ht, (char*)&key, sizeof(key) - 1, (void*)&entry, sizeof(entry))
109+
zend_hash_str_update_mem(&ancillary_registry.ht, (char*)&key, sizeof(key), (void*)&entry, sizeof(entry))
110110

111111
#if defined(IPV6_PKTINFO) && HAVE_IPV6
112112
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)
156156
tsrm_mutex_unlock(ancillary_mutex);
157157
#endif
158158

159-
if ((entry = zend_hash_str_find_ptr(&ancillary_registry.ht, (char*)&key, sizeof(key) - 1)) != NULL) {
159+
if ((entry = zend_hash_str_find_ptr(&ancillary_registry.ht, (char*)&key, sizeof(key))) != NULL) {
160160
return entry;
161161
} else {
162162
return NULL;

0 commit comments

Comments
 (0)