summaryrefslogtreecommitdiff
path: root/plugingui/widget.cc
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2017-05-19 19:09:17 +0200
committerBent Bisballe Nyeng <deva@aasimon.org>2017-05-19 19:09:17 +0200
commitff83cfac10939ceba524c93d4e36f634f4bec805 (patch)
treed481913f2136bf04d2d1deb650e6bd084a531676 /plugingui/widget.cc
parenta3dc9bd19f976cbc84ba3d1a16c72257b42b28ba (diff)
Make sure we don't resize to negative values.
Diffstat (limited to 'plugingui/widget.cc')
-rw-r--r--plugingui/widget.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/plugingui/widget.cc b/plugingui/widget.cc
index 4a99524..c148219 100644
--- a/plugingui/widget.cc
+++ b/plugingui/widget.cc
@@ -122,6 +122,7 @@ void Widget::reparent(Widget* parent)
void Widget::resize(std::size_t width, std::size_t height)
{
+ assert(width < 32000 && height < 32000); // Catch negative values as size_t
if((width < 1) || (height < 1) ||
((width == _width) && (height == _height)))
{