udf: Fix incorrect error code in udf_current_aext()

There are two places in udf_current_aext() that return -1 instead of
proper error code. Fix them.

Signed-off-by: Jan Kara <jack@suse.cz>
This commit is contained in:
Jan Kara 2026-11-05 15:11:44 +01:00
parent a3b98efdb3
commit e5801273f9

View File

@ -2330,10 +2330,10 @@ int udf_current_aext(struct inode *inode, struct extent_position *epos,
ptr = epos->bh->b_data + epos->offset;
if (check_add_overflow(sizeof(struct allocExtDesc),
le32_to_cpu(header->lengthAllocDescs), &alen))
return -1;
return -EFSCORRUPTED;
if (alen > epos->bh->b_size)
return -1;
return -EFSCORRUPTED;
}
switch (iinfo->i_alloc_type) {