mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-05 00:56:39 +00:00
Kernel: Fix undefined behavior due to shifting out of bounds
This commit is contained in:
parent
b7d726e226
commit
314f04b896
Notes:
sideshowbarker
2024-07-18 21:12:06 +09:00
Author: https://github.com/supercomputer7
Commit: 314f04b896
Pull-request: https://github.com/SerenityOS/serenity/pull/5865
Reviewed-by: https://github.com/bgianfo
Reviewed-by: https://github.com/tomuta
1 changed files with 1 additions and 1 deletions
|
@ -485,7 +485,7 @@ public:
|
|||
}
|
||||
|
||||
bool is_set(PortInterruptFlag flag) { return m_bitfield & (u32)flag; }
|
||||
void set_at(PortInterruptFlag flag) { m_bitfield = m_bitfield | (1 << (u32)flag); }
|
||||
void set_at(PortInterruptFlag flag) { m_bitfield = m_bitfield | static_cast<u32>(flag); }
|
||||
void clear() { m_bitfield = 0; }
|
||||
bool is_cleared() const { return m_bitfield == 0; }
|
||||
void set_all() { m_bitfield = 0xffffffff; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue