Explorar el Código

[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 hace 7 años
padre
commit
90dae44640
Se han modificado 1 ficheros con 1 adiciones y 0 borrados
  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;
     }