Apply fixes reported by Andreas Gruenbacher:

pass1.c (check_ext_attr): Skip zero-length EA entries.

problem.c: PR_1_EA_ALLOC_COLLISION shouldn't abort, but should prompt
	to clear the EA block.
This commit is contained in:
Theodore Ts'o 2001-07-25 19:48:24 -04:00
parent 029326d6d1
commit 14fe1c3314
3 changed files with 11 additions and 3 deletions

View File

@ -1,3 +1,10 @@
2001-07-25 Theodore Tso <tytso@valinux.com>
* pass1.c (check_ext_attr): Skip zero-length EA entries.
* problem.c: PR_1_EA_ALLOC_COLLISION shouldn't abort, but should
prompt to clear the EA block.
2001-07-22 Theodore Tso <tytso@valinux.com>
* journal.c (ll_rw_block): Use ctx->journal_io instead of the

View File

@ -1057,8 +1057,9 @@ static int check_ext_attr(e2fsck_t ctx, struct problem_context *pctx,
if (fix_problem(ctx, PR_1_EA_BAD_VALUE, pctx))
goto clear_extattr;
}
if (region_allocate(region, entry->e_value_offs,
EXT2_EXT_ATTR_SIZE(entry->e_value_size))) {
if (entry->e_value_size &&
region_allocate(region, entry->e_value_offs,
EXT2_EXT_ATTR_SIZE(entry->e_value_size))) {
if (fix_problem(ctx, PR_1_EA_ALLOC_COLLISION, pctx))
goto clear_extattr;
}

View File

@ -610,7 +610,7 @@ static const struct e2fsck_problem problem_table[] = {
/* Error EA allocation collision */
{ PR_1_EA_ALLOC_COLLISION,
N_("@a @b %b is corrupt (allocation collision). "),
PROMPT_ABORT, 0},
PROMPT_CLEAR, 0},
/* Bad extended attribute name */
{ PR_1_EA_BAD_NAME,