summaryrefslogtreecommitdiffstats
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
parent6fd032c93b16a54bad2fd10c39c7c085d527a597 (diff)
downloadsuil-3b2e908f28682cc31fcccb2c5f6c3ebf5095f888.tar.gz
suil-3b2e908f28682cc31fcccb2c5f6c3ebf5095f888.tar.bz2
suil-3b2e908f28682cc31fcccb2c5f6c3ebf5095f888.zip
Fix potential use of uninitialized memory
-rw-r--r--NEWS4
-rw-r--r--src/x11_in_gtk2.c1
-rw-r--r--src/x11_in_gtk3.c1
3 files changed, 4 insertions, 2 deletions
diff --git a/NEWS b/NEWS
index fa1a875..0648d30 100644
--- a/NEWS
+++ b/NEWS
@@ -4,9 +4,9 @@ suil (0.8.7) unstable;
* Add support for Qt5 in Gtk2
* Add suil_init() to support early initialization and passing any necessary
information that may be needed in the future (thanks Stefan Westerfeld)
- * Fix memory leaks
+ * Fix minor memory errors
- -- David Robillard <d@drobilla.net> Sun, 07 May 2017 13:23:10 +0200
+ -- David Robillard <d@drobilla.net> Sun, 07 May 2017 13:26:59 +0200
suil (0.8.4) stable;
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);