From: Theodore Ts'o Date: Wed, 25 Jul 2001 23:48:24 +0000 (-0400) Subject: Apply fixes reported by Andreas Gruenbacher: X-Git-Tag: E2FSPROGS-1_23-WIP-0727~13 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=14fe1c33145fc6af4f4338792bccf240088d43a0;p=tools%2Fe2fsprogs.git 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. --- diff --git a/e2fsck/ChangeLog b/e2fsck/ChangeLog index d69d349..22b4708 100644 --- a/e2fsck/ChangeLog +++ b/e2fsck/ChangeLog @@ -1,3 +1,10 @@ +2001-07-25 Theodore Tso + + * 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 * journal.c (ll_rw_block): Use ctx->journal_io instead of the diff --git a/e2fsck/pass1.c b/e2fsck/pass1.c index ab8dcfe..6d763d2 100644 --- a/e2fsck/pass1.c +++ b/e2fsck/pass1.c @@ -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; } diff --git a/e2fsck/problem.c b/e2fsck/problem.c index 34a3784..dd215a1 100644 --- a/e2fsck/problem.c +++ b/e2fsck/problem.c @@ -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,