[CRIU] [PATCH 3/5] cr-exec: initialize the creds pointer to NULL

Andrey Vagin avagin at openvz.org
Thu Jul 14 11:44:16 PDT 2016


From: Andrew Vagin <avagin at virtuozzo.com>

Error (arch/x86/crtools.c:83): Failed to get auxval, err: 0
==2103== Conditional jump or move depends on uninitialised value(s)
==2103==    at 0x46F073: seize_wait_task (ptrace.c:238)
==2103==    by 0x437592: cr_exec (cr-exec.c:137)
==2103==    by 0x41F6FC: main (crtools.c:789)

Signed-off-by: Andrew Vagin <avagin at virtuozzo.com>
---
 criu/cr-exec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/criu/cr-exec.c b/criu/cr-exec.c
index 26a8497..ba38269 100644
--- a/criu/cr-exec.c
+++ b/criu/cr-exec.c
@@ -119,7 +119,7 @@ int cr_exec(int pid, char **opt)
 	struct parasite_ctl *ctl;
 	struct vm_area_list vmas;
 	int ret, prev_state, exit_code = -1;
-	struct proc_status_creds *creds;
+	struct proc_status_creds *creds = NULL;
 
 	if (!sys_name) {
 		pr_err("Syscall name required\n");
-- 
2.7.4



More information about the CRIU mailing list