X-Git-Url: https://git.karo-electronics.de/?a=blobdiff_plain;f=fs%2Fisofs%2Fnamei.c;h=8299889a835ea5c9b95c7d71afcabdb4610310c1;hb=ae937debe178b4327fd67d604ee83a20f22aa0de;hp=344b247bc29ab1f104fcc25af9a831052267baad;hpb=0b61a2ba5dfd1620731e717d686e6ade657fd975;p=mv-sheeva.git diff --git a/fs/isofs/namei.c b/fs/isofs/namei.c index 344b247bc29..8299889a835 100644 --- a/fs/isofs/namei.c +++ b/fs/isofs/namei.c @@ -111,6 +111,13 @@ isofs_find_entry(struct inode *dir, struct dentry *dentry, dlen = de->name_len[0]; dpnt = de->name; + /* Basic sanity check, whether name doesn't exceed dir entry */ + if (de_len < dlen + sizeof(struct iso_directory_record)) { + printk(KERN_NOTICE "iso9660: Corrupted directory entry" + " in block %lu of inode %lu\n", block, + dir->i_ino); + return 0; + } if (sbi->s_rock && ((i = get_rock_ridge_filename(de, tmpname, dir)))) {