1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00

Use ull integer suffix for bitwise logic (GH-19673)

If (brake->type+1) exeeds 30, we have undefined behavior and won't actually
remove the relevant bit.

See GH-19633
This commit is contained in:
Ilija Tovilo
2025-09-03 13:29:12 +02:00
committed by GitHub
parent 1e02099e6a
commit 8a4cbde8c7

View File

@@ -1206,14 +1206,14 @@ PHPDBG_API void phpdbg_delete_breakpoint(zend_ulong num) /* {{{ */
name = estrdup(brake->name);
name_len = strlen(name);
if (zend_hash_num_elements(&PHPDBG_G(bp)[type]) == 1) {
PHPDBG_G(flags) &= ~(1<<(brake->type+1));
PHPDBG_G(flags) &= ~(1ull<<(brake->type+1));
}
}
break;
default: {
if (zend_hash_num_elements(table) == 1) {
PHPDBG_G(flags) &= ~(1<<(brake->type+1));
PHPDBG_G(flags) &= ~(1ull<<(brake->type+1));
}
}
}