[PATCH] 2.4.7 tiny NTFS fix

Anton Altaparmakov (aia21@cus.cam.ac.uk)
Sun, 22 Jul 2001 21:12:24 +0100 (BST)


Linus,

Please apply below patch (this time properly inlined I hope). It is
against 2.4.7-pre8 but should apply cleanly to 2.4.7. It adds a return
value check.

Thanks to Rasmus Andersen for initial patch.

Best regards,

Anton

-- 
Anton Altaparmakov <aia21 at cam.ac.uk> (replace at with @)
Linux NTFS maintainer / WWW: http://linux-ntfs.sf.net/
ICQ: 8561279 / WWW: http://www-stu.christs.cam.ac.uk/~aia21/

------ cut here ------ --- linux-2.4.7-pre8-vanilla/fs/ntfs/dir.c.old Sun Jul 22 21:03:08 2001 +++ linux-2.4.7-pre8-vanilla/fs/ntfs/dir.c Sun Jul 22 21:02:59 2001 @@ -894,6 +894,11 @@ return -EIO; } attr = ntfs_find_attr(ino, vol->at_index_allocation, I30); + if (!attr) { + ntfs_free(buf); + ntfs_debug(DEBUG_DIR3, "unsorted 9.5\n"); + return -EIO; + } while (1) { if ((__s64)*p_high << vol->cluster_size_bits > attr->size) { /* No more index records. */ - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/