Skip to content

Commit 65d5f76

Browse files
committed
Review
1 parent eac268c commit 65d5f76

3 files changed

Lines changed: 4 additions & 3 deletions

File tree

Zend/zend_closures.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ static inline uint32_t zend_closure_flags(const zend_closure *closure)
5454

5555
static inline bool zend_closure_is_fake(const zend_closure *closure)
5656
{
57-
return (closure)->func.common.fn_flags & ZEND_ACC_FAKE_CLOSURE;
57+
return closure->func.common.fn_flags & ZEND_ACC_FAKE_CLOSURE;
5858
}
5959

6060
ZEND_METHOD(Closure, __invoke) /* {{{ */

Zend/zend_partial.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -742,7 +742,7 @@ static zend_op_array *zp_compile(zval *this_ptr, zend_function *function,
742742
}
743743

744744
zval *tmp = zend_arena_alloc(&CG(ast_arena), zend_safe_address_guarded(new_argc, sizeof(zval), 0));
745-
memcpy(tmp, argv, argc * sizeof(zval));
745+
memcpy(tmp, argv, zend_safe_address_guarded(argc, sizeof(zval), 0));
746746
argv = tmp;
747747

748748
/* Compute param positions and number of required args, add implicit

ext/opcache/ZendAccelerator.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2031,7 +2031,8 @@ static zend_string *zend_accel_pfa_key(const zend_op *declaring_opline,
20312031
const size_t max_key_len = strlen(PFA_KEY_PREFIX) + (sizeof(uintptr_t)*2) + strlen(":") + (sizeof(uintptr_t)*2);
20322032
zend_string *key = zend_string_alloc(max_key_len, 0);
20332033

2034-
char *dest = zend_mempcpy(ZSTR_VAL(key), PFA_KEY_PREFIX, strlen(PFA_KEY_PREFIX));
2034+
char *dest = ZSTR_VAL(key);
2035+
dest = zend_mempcpy(dest, PFA_KEY_PREFIX, strlen(PFA_KEY_PREFIX));
20352036
dest = zend_accel_uintptr_hex(dest, (uintptr_t)declaring_opline);
20362037
*dest++ = ':';
20372038

0 commit comments

Comments
 (0)