Преглед на файлове

[PAL] Fix uninitialized field action.sa_flags

action.sa_flags will only be initialized in the truth branch, while in the false branch,
only sa_handler is initialized. Before action.sa_flags |= SA_NOCLDWAIT,
action.sa_flags should be properly initialized (in this case 0x0u).

Signed-off-by: Gary <gang1.wang@intel.com>
Gary преди 7 години
родител
ревизия
90dae44640
променени са 1 файла, в които са добавени 1 реда и са изтрити 0 реда
  1. 1 0
      Pal/src/host/Linux/db_exception.c

+ 1 - 0
Pal/src/host/Linux/db_exception.c

@@ -86,6 +86,7 @@ int set_sighandler (int * sigs, int nsig, void * handler)
         action.sa_restorer = restore_rt;
 #endif
     } else {
+        action.sa_flags = 0x0u;
         action.sa_handler = SIG_IGN;
     }