summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2017-05-07 13:31:28 +0200
committerDavid Robillard <d@drobilla.net>2017-05-07 13:31:28 +0200
commit3b2e908f28682cc31fcccb2c5f6c3ebf5095f888 (patch)
treef1087964ab1c8a611644265321fa023530b4e971 /src
parent6fd032c93b16a54bad2fd10c39c7c085d527a597 (diff)
downloadsuil-3b2e908f28682cc31fcccb2c5f6c3ebf5095f888.tar.gz
suil-3b2e908f28682cc31fcccb2c5f6c3ebf5095f888.tar.bz2
suil-3b2e908f28682cc31fcccb2c5f6c3ebf5095f888.zip
Fix potential use of uninitialized memory
Diffstat (limited to 'src')
-rw-r--r--src/x11_in_gtk2.c1
-rw-r--r--src/x11_in_gtk3.c1
2 files changed, 2 insertions, 0 deletions
diff --git a/src/x11_in_gtk2.c b/src/x11_in_gtk2.c
index 43e1fa1..4b9e3cf 100644
--- a/src/x11_in_gtk2.c
+++ b/src/x11_in_gtk2.c
@@ -193,6 +193,7 @@ forward_size_request(SuilX11Wrapper* socket,
int width = allocation->width;
int height = allocation->height;
XSizeHints hints;
+ memset(&hints, 0, sizeof(hints));
XGetNormalHints(GDK_WINDOW_XDISPLAY(window),
(Window)socket->instance->ui_widget,
&hints);
diff --git a/src/x11_in_gtk3.c b/src/x11_in_gtk3.c
index c21a23f..0ff0ead 100644
--- a/src/x11_in_gtk3.c
+++ b/src/x11_in_gtk3.c
@@ -196,6 +196,7 @@ forward_size_request(SuilX11Wrapper* socket,
int width = allocation->width;
int height = allocation->height;
XSizeHints hints;
+ memset(&hints, 0, sizeof(hints));
XGetNormalHints(GDK_WINDOW_XDISPLAY(window),
(Window)socket->instance->ui_widget,
&hints);