summaryrefslogtreecommitdiffstats
path: root/sbin/fsck/pass1.c
diff options
context:
space:
mode:
Diffstat (limited to 'sbin/fsck/pass1.c')
-rw-r--r--sbin/fsck/pass1.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sbin/fsck/pass1.c b/sbin/fsck/pass1.c
index ca255fe..a3ab2f9 100644
--- a/sbin/fsck/pass1.c
+++ b/sbin/fsck/pass1.c
@@ -160,7 +160,7 @@ checkinode(inumber, idesc)
* Fake ndb value so direct/indirect block checks below
* will detect any garbage after symlink string.
*/
- if (dp->di_size < sblock.fs_maxsymlinklen) {
+ if ((dp->di_size < sblock.fs_maxsymlinklen) || dp->di_blocks == 0) {
ndb = howmany(dp->di_size, sizeof(daddr_t));
if (ndb > NDADDR) {
j = ndb - NDADDR;
OpenPOWER on IntegriCloud