Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

MFC r253280:

Only copy as much bytes as there in superblock, instead of the full
block copy, when copying the superblock into the snapshot.  UFS1 does
not align superblock on the block boundary, and bcopy runs off the end
of the buffer.

Approved by:	re (hrs)
  • Loading branch information...
commit 733c80745678d637b37fdb70457bd8062d2cf7d1 1 parent edf4181
@kostikbel kostikbel authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  sys/ufs/ffs/ffs_snapshot.c
View
2  sys/ufs/ffs/ffs_snapshot.c
@@ -790,7 +790,7 @@ ffs_snapshot(mp, snapfile)
brelse(nbp);
} else {
loc = blkoff(fs, fs->fs_sblockloc);
- bcopy((char *)copy_fs, &nbp->b_data[loc], fs->fs_bsize);
+ bcopy((char *)copy_fs, &nbp->b_data[loc], (u_int)fs->fs_sbsize);
bawrite(nbp);
}
/*
Please sign in to comment.
Something went wrong with that request. Please try again.