mirror of
https://github.com/genodelabs/genode.git
synced 2025-04-07 11:27:29 +00:00
os: fix multiplication wrap-around in Area::count
When having a maximized terminal window, a suspend was causing an invalid mode change at nitpicker. This triggered a huge resource request in nitpicker because the RAM-quota check was rendered ineffective by a wrap-around during unsigned multiplication. Issue genodelabs/genode#5180 Fixes genodelabs/genode#5201
This commit is contained in:
parent
dc5990ce4a
commit
78a6d2bd0c
@ -105,7 +105,7 @@ class Genode::Area
|
||||
|
||||
bool valid() const { return _w > 0 && _h > 0; }
|
||||
|
||||
size_t count() const { return _w*_h; }
|
||||
size_t count() const { return (size_t)_w*(size_t)_h; }
|
||||
|
||||
/**
|
||||
* Operator for testing non-equality of two areas
|
||||
|
Loading…
x
Reference in New Issue
Block a user