Verify length of the data to read as well.

This commit is contained in:
pjd 2005-08-28 00:14:21 +00:00
parent 97de855505
commit fc694070c0

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;