patch-2.4.0-test7 linux/fs/hpfs/map.c

Next file: linux/fs/inode.c
Previous file: linux/fs/hpfs/hpfs.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.0-test6/linux/fs/hpfs/map.c linux/fs/hpfs/map.c
@@ -59,6 +59,11 @@
 	cpds = cp->array[0].code_page_data;
 	cpi = cp->array[0].index;
 	brelse(bh);
+
+	if (cpi >= 3) {
+		printk("HPFS: Code page index out of array\n");
+		return NULL;
+	}
 	
 	if (!(cpd = hpfs_map_sector(s, cpds, &bh, 0))) return NULL;
 	if ((unsigned)cpd->offs[cpi] > 0x178) {

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)