mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Prevent potential undefined behavior by shifting by a wrapped uint.
Found by clang static analyzer.
This commit is contained in:
parent
606d9cfee6
commit
3d1362757b
@ -374,6 +374,8 @@ GncInt128&
|
||||
GncInt128::operator<<= (unsigned int i) noexcept
|
||||
{
|
||||
auto flags = get_flags(m_hi);
|
||||
if (i == 0)
|
||||
return *this;
|
||||
if (i > maxbits)
|
||||
{
|
||||
flags &= 0xfe;
|
||||
|
Loading…
Reference in New Issue
Block a user