summaryrefslogtreecommitdiff
path: root/e2fsck
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2007-04-04 21:42:42 -0400
committerTheodore Ts'o <tytso@mit.edu>2007-04-04 21:42:42 -0400
commit86bc90f4f11df090f86dc764a4ea2d6dd5c13ffe (patch)
treebaa407f07b616b2e9ad6074f9fac23154140672a /e2fsck
parent106ad96daee151064aa44a857f82ba10c8258b40 (diff)
downloade2fsprogs-86bc90f4f11df090f86dc764a4ea2d6dd5c13ffe.tar.gz
Fix potential reference (and free) to an uninitialized pointer in e2fsck
This was introduced recently when fixing a problem noted by Coverty. Oops! Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'e2fsck')
-rw-r--r--e2fsck/ChangeLog6
-rw-r--r--e2fsck/pass1.c2
2 files changed, 7 insertions, 1 deletions
diff --git a/e2fsck/ChangeLog b/e2fsck/ChangeLog
index 1eb1064d..cc359559 100644
--- a/e2fsck/ChangeLog
+++ b/e2fsck/ChangeLog
@@ -1,3 +1,9 @@
+2007-04-04 Theodore Tso <tytso@mit.edu>
+
+ * pass1.c (check_ext_attr): Make sure the region variable is
+ initialized to zero to avoid checking and then freeing an
+ uninitialized pointer if there is a corrupted EA block.
+
2007-03-31 Theodore Tso <tytso@mit.edu>
* pass1.c (e2fsck_pass1, check_is_really_dir): Check for an edge
diff --git a/e2fsck/pass1.c b/e2fsck/pass1.c
index 6f816dff..d45c4987 100644
--- a/e2fsck/pass1.c
+++ b/e2fsck/pass1.c
@@ -1231,7 +1231,7 @@ static int check_ext_attr(e2fsck_t ctx, struct problem_context *pctx,
struct ext2_ext_attr_header *header;
struct ext2_ext_attr_entry *entry;
int count;
- region_t region;
+ region_t region = 0;
blk = inode->i_file_acl;
if (blk == 0)