diff -u linux/fs/ncpfs/dir.c-o linux/fs/ncpfs/dir.c --- linux/fs/ncpfs/dir.c-o 2004-01-22 15:39:20.000000000 +0100 +++ linux/fs/ncpfs/dir.c 2004-01-22 15:39:20.000000000 +0100 @@ -328,6 +328,8 @@ { int res; lock_kernel(); + if (dentry->d_name.len >= 254) + return -ENAMETOOLONG; res = __ncp_lookup_validate(dentry, flags); unlock_kernel(); return res; @@ -873,6 +875,8 @@ static int ncp_create(struct inode *dir, struct dentry *dentry, int mode) { + if (dentry->d_name.len >= 254) + return -ENAMETOOLONG; return ncp_create_new(dir, dentry, mode, 0); }