[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <ea11fea30809140732i38680994na7d686835e2949cd@mail.gmail.com>
Date: Sun, 14 Sep 2008 20:02:12 +0530
From: "Manish Katiyar" <mkatiyar@...il.com>
To: linux-ext4@...r.kernel.org, "Theodore Tso" <tytso@....edu>
Cc: mkatiyar@...il.com
Subject: [PATCH] resize2fs : Fix potential memory corruption in ext2fs_progress_init()
Since "prog" is not initialized with 0 , below check in
ext2fs_progress_init() is wrong and may lead to corruptions.
Signed-off-by: Manish Katiyar <mkatiyar@...il.com>
---
resize/sim_progress.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/resize/sim_progress.c b/resize/sim_progress.c
index a575633..e7dba88 100644
--- a/resize/sim_progress.c
+++ b/resize/sim_progress.c
@@ -83,7 +83,7 @@ errcode_t ext2fs_progress_init(ext2_sim_progmeter *ret_prog,
errcode_t retval;
retval = ext2fs_get_mem(sizeof(struct ext2_sim_progress), &prog);
- if (!prog)
+ if (retval)
return retval;
memset(prog, 0, sizeof(struct ext2_sim_progress));
--
1.5.4.3
Thanks -
Manish
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists