mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
Avoid null arithmetic UB in EX_VAR_TO_NUM
This commit is contained in:
parent
4786207ecc
commit
0427ef91a6
1 changed files with 1 additions and 1 deletions
|
@ -577,7 +577,7 @@ struct _zend_execute_data {
|
|||
#define EX_VAR(n) ZEND_CALL_VAR(execute_data, n)
|
||||
#define EX_VAR_NUM(n) ZEND_CALL_VAR_NUM(execute_data, n)
|
||||
|
||||
#define EX_VAR_TO_NUM(n) ((uint32_t)(ZEND_CALL_VAR(NULL, n) - ZEND_CALL_VAR_NUM(NULL, 0)))
|
||||
#define EX_VAR_TO_NUM(n) ((uint32_t)((n) / sizeof(zval) - ZEND_CALL_FRAME_SLOT))
|
||||
|
||||
#define ZEND_OPLINE_TO_OFFSET(opline, target) \
|
||||
((char*)(target) - (char*)(opline))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue