gmain: Fix use of uninitialized memory in sigaction structure
authorStef Walter <stefw@gnome.org>
Thu, 31 Oct 2013 10:43:14 +0000 (11:43 +0100)
committerStef Walter <stefw@gnome.org>
Mon, 11 Nov 2013 06:40:16 +0000 (07:40 +0100)
https://bugzilla.gnome.org/show_bug.cgi?id=711754

glib/gmain.c

index 9c37bb2..608c1a5 100644 (file)
@@ -4978,6 +4978,7 @@ unref_unix_signal_handler_unlocked (int signum)
   if (unix_signal_refcount[signum] == 0)
     {
       struct sigaction action;
+      memset (&action, 0, sizeof (action));
       action.sa_handler = SIG_DFL;
       sigemptyset (&action.sa_mask);
       sigaction (signum, &action, NULL);