From 76ef79a0818cedc73e38ba2f9fa8437bb252ad0e Mon Sep 17 00:00:00 2001 From: Cyrill Gorcunov Date: Thu, 12 Jan 2012 14:09:54 +0400 Subject: [PATCH] dump: Fix stack data written to image I case if there is no file id provided we might be writting stack data to image. Better put zeros there. Signed-off-by: Cyrill Gorcunov --- cr-dump.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cr-dump.c b/cr-dump.c index dbec534c5..7216d7903 100644 --- a/cr-dump.c +++ b/cr-dump.c @@ -122,6 +122,8 @@ static int dump_one_reg_file(int type, unsigned long fd_name, int lfd, e.addr = fd_name; if (id) memcpy(e.id, id, FD_ID_SIZE); + else + memzero(e.id, FD_ID_SIZE); pr_info("fdinfo: type: %2x len: %2x flags: %4x pos: %8x addr: %16lx\n", type, len, flags, pos, fd_name);