patch-2.4.0-test8 linux/fs/ncpfs/dir.c
Next file: linux/fs/ncpfs/ioctl.c
Previous file: linux/fs/msdos/namei.c
Back to the patch index
Back to the overall index
- Lines: 10
- Date:
Thu Sep 7 08:43:49 2000
- Orig file:
v2.4.0-test7/linux/fs/ncpfs/dir.c
- Orig date:
Wed Aug 23 18:36:38 2000
diff -u --recursive --new-file v2.4.0-test7/linux/fs/ncpfs/dir.c linux/fs/ncpfs/dir.c
@@ -342,7 +342,8 @@
goto bad_addr;
if ((dent_addr & ~align_mask) != dent_addr)
goto bad_align;
- if (!kern_addr_valid(dent_addr))
+ if ((!kern_addr_valid(dent_addr)) || (!kern_addr_valid(dent_addr -1 +
+ sizeof(struct dentry))))
goto bad_addr;
/*
* Looks safe enough to dereference ...
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)