From 3b2e908f28682cc31fcccb2c5f6c3ebf5095f888 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 7 May 2017 13:31:28 +0200 Subject: Fix potential use of uninitialized memory --- src/x11_in_gtk2.c | 1 + src/x11_in_gtk3.c | 1 + 2 files changed, 2 insertions(+) (limited to 'src') 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); -- cgit v1.2.1