Skip to content

Commit 8a4cbde

Browse files
authored
Use ull integer suffix for bitwise logic (phpGH-19673)
If (brake->type+1) exeeds 30, we have undefined behavior and won't actually remove the relevant bit. See phpGH-19633
1 parent 1e02099 commit 8a4cbde

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sapi/phpdbg/phpdbg_bp.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1206,14 +1206,14 @@ PHPDBG_API void phpdbg_delete_breakpoint(zend_ulong num) /* {{{ */
12061206
name = estrdup(brake->name);
12071207
name_len = strlen(name);
12081208
if (zend_hash_num_elements(&PHPDBG_G(bp)[type]) == 1) {
1209-
PHPDBG_G(flags) &= ~(1<<(brake->type+1));
1209+
PHPDBG_G(flags) &= ~(1ull<<(brake->type+1));
12101210
}
12111211
}
12121212
break;
12131213

12141214
default: {
12151215
if (zend_hash_num_elements(table) == 1) {
1216-
PHPDBG_G(flags) &= ~(1<<(brake->type+1));
1216+
PHPDBG_G(flags) &= ~(1ull<<(brake->type+1));
12171217
}
12181218
}
12191219
}

0 commit comments

Comments
 (0)