Whamcloud - gitweb
git://git.whamcloud.com
/
tools
/
e2fsprogs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
03206bd
)
resize2fs: Fix potential memory corruption in ext2fs_progress_init()
author
Manish Katiyar
<mkatiyar@gmail.com>
Wed, 1 Oct 2008 23:42:57 +0000
(19:42 -0400)
committer
Theodore Ts'o
<tytso@mit.edu>
Wed, 1 Oct 2008 23:42:57 +0000
(19:42 -0400)
Check the return value of ext2fs_get_mem, since prog isn't initialized
so checking may miss a failed memory allocation.
Signed-off-by: Manish Katiyar <mkatiyar@gmail.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
resize/sim_progress.c
patch
|
blob
|
history
diff --git
a/resize/sim_progress.c
b/resize/sim_progress.c
index
a575633
..
e7dba88
100644
(file)
--- 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));