mirror of
https://github.com/freebsd/freebsd-src
synced 2024-07-21 18:27:22 +00:00
Fix a bug in fsck_ffs(8) triggered by corrupted filesystems.
Add missing check for failed block read when checking information about a snapshot file. Reported-by: Andreas Bock PR: 274404 MFC-after: 1 week
This commit is contained in:
parent
a113f9dd98
commit
1e39a0886e
|
@ -299,6 +299,8 @@ checksnapinfo(struct inode *snapip)
|
|||
size = fragroundup(fs,
|
||||
DIP(snapip->i_dp, di_size) - lblktosize(fs, lbn));
|
||||
bp = getdatablk(idesc.id_parent, size, BT_DATA);
|
||||
if (bp->b_errs != 0)
|
||||
return (0);
|
||||
snapblklist = (daddr_t *)bp->b_un.b_buf;
|
||||
/*
|
||||
* snapblklist[0] is the size of the list
|
||||
|
|
Loading…
Reference in a new issue