proc_parse: don't read an uninitialized pointer

Submitted by Andrei Vagin on June 9, 2016, 9:10 p.m.

Details

Message ID 1465506627-19697-1-git-send-email-avagin@openvz.org
State Accepted
Series "proc_parse: don't read an uninitialized pointer"
Commit a81056d503a1500caa415052075bd9911a295dad
Headers show

Commit Message

Andrei Vagin June 9, 2016, 9:10 p.m.
From: Andrew Vagin <avagin@virtuozzo.com>

CID 161665 (#1 of 1): Uninitialized pointer read (UNINIT)
14. uninit_use: Using uninitialized value vma.

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

Patch hide | download patch | download mbox

diff --git a/criu/proc_parse.c b/criu/proc_parse.c
index ef86152..3677e4a 100644
--- a/criu/proc_parse.c
+++ b/criu/proc_parse.c
@@ -423,7 +423,7 @@  int parse_self_maps_lite(struct vm_area_list *vms)
 			prev = vma;
 		}
 
-		pr_debug("Parsed %"PRIx64"-%"PRIx64" vma\n", vma->e->start, vma->e->end);
+		pr_debug("Parsed %"PRIx64"-%"PRIx64" vma\n", prev->e->start, prev->e->end);
 	}
 
 	fclose(maps);

Comments

Pavel Emelianov June 15, 2016, 11:36 a.m.
Applied