diff options
author | Al Smith <Al.Smith@aeschi.ch.eu.org> | 1999-05-27 12:04:18 +0000 |
---|---|---|
committer | Al Smith <Al.Smith@aeschi.ch.eu.org> | 1999-05-27 12:04:18 +0000 |
commit | b61a0946e6223fd330f45aaf9d4f2e6d9bc83adb (patch) | |
tree | 67e9349cf3c5b38a15c56c2f54f6ed375c9fb3aa /fs/efs/dir.c | |
parent | 6169897dfc815d9066084d84b7d6affab525686e (diff) |
EFS updated to 1.0b. See http://aeschi.ch.eu.org/efs/HISTORY
Diffstat (limited to 'fs/efs/dir.c')
-rw-r--r-- | fs/efs/dir.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/efs/dir.c b/fs/efs/dir.c index ea8efd2dd..ea484dab4 100644 --- a/fs/efs/dir.c +++ b/fs/efs/dir.c @@ -109,6 +109,13 @@ static int efs_readdir(struct file *filp, void *dirent, filldir_t filldir) { /* copy filename and data in dirslot */ filldir(dirent, nameptr, namelen, filp->f_pos, inodenum); + /* sanity check */ + if (nameptr - (char *) dirblock + namelen > EFS_DIRBSIZE) { + printk(KERN_WARNING "EFS: directory entry %d exceeds directory block\n", slot); + slot++; + continue; + } + /* store position of next slot */ if (++slot == dirblock->slots) { slot = 0; |