Skip to content

Commit 9faa3f1

Browse files
committed
Merge branch 'PHP-8.1' into PHP-8.2
2 parents f7a1918 + 3a44c78 commit 9faa3f1

File tree

2 files changed

+15
-12
lines changed

2 files changed

+15
-12
lines changed

NEWS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ PHP NEWS
2121

2222
- PHPDBG:
2323
. Fix undefined behaviour in phpdbg_load_module_or_extension(). (nielsdos)
24+
. Fix NULL pointer dereference in phpdbg_create_conditional_breal(). (nielsdos)
2425

2526
05 Jan 2023, PHP 8.2.1
2627

sapi/phpdbg/phpdbg_bp.c

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -829,19 +829,21 @@ static inline void phpdbg_create_conditional_break(phpdbg_breakcond_t *brake, co
829829
uint32_t cops = CG(compiler_options);
830830
zend_string *bp_code;
831831

832-
switch (param->type) {
833-
case STR_PARAM:
834-
case NUMERIC_FUNCTION_PARAM:
835-
case METHOD_PARAM:
836-
case NUMERIC_METHOD_PARAM:
837-
case FILE_PARAM:
838-
case ADDR_PARAM:
839-
/* do nothing */
840-
break;
832+
if (param) {
833+
switch (param->type) {
834+
case STR_PARAM:
835+
case NUMERIC_FUNCTION_PARAM:
836+
case METHOD_PARAM:
837+
case NUMERIC_METHOD_PARAM:
838+
case FILE_PARAM:
839+
case ADDR_PARAM:
840+
/* do nothing */
841+
break;
841842

842-
default:
843-
phpdbg_error("Invalid parameter type for conditional breakpoint");
844-
return;
843+
default:
844+
phpdbg_error("Invalid parameter type for conditional breakpoint");
845+
return;
846+
}
845847
}
846848

847849
PHPDBG_BREAK_INIT(new_break, PHPDBG_BREAK_COND);

0 commit comments

Comments
 (0)