Verify length of the data to read as well.

This commit is contained in:
Pawel Jakub Dawidek 2005-08-28 00:14:21 +00:00
parent fc3643bb24
commit 3ae0e7d8ae
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=149538

View File

@ -65,6 +65,8 @@ g_label_ntfs_taste(struct g_consumer *cp, char *label, size_t size)
mftrecsz = (char)bf->bf_mftrecsz;
recsize = (mftrecsz > 0) ? (mftrecsz * bf->bf_bps * bf->bf_spc) : (1 << -mftrecsz);
if(recsize % pp->sectorsize != 0)
goto done;
voloff = bf->bf_mftcn * bf->bf_spc * bf->bf_bps +
recsize * NTFS_VOLUMEINO;