[glib/wip/gcleanup: 24/79] gmain: Fix use of uninitialized memory in sigaction structure



commit 91eb92af376e34999a76f9539301166fa1a3ed1e
Author: Stef Walter <stefw gnome org>
Date:   Thu Oct 31 11:43:14 2013 +0100

    gmain: Fix use of uninitialized memory in sigaction structure
    
    https://bugzilla.gnome.org/show_bug.cgi?id=711754

 glib/gmain.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
---
diff --git a/glib/gmain.c b/glib/gmain.c
index 871278f..5f16f6d 100644
--- a/glib/gmain.c
+++ b/glib/gmain.c
@@ -4982,6 +4982,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);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]