summaryrefslogtreecommitdiffstats
path: root/fs/udf/dir.c
diff options
context:
space:
mode:
authorFabian Frederick <fabf@skynet.be>2015-04-08 21:23:57 +0200
committerJan Kara <jack@suse.cz>2015-05-18 11:23:06 +0200
commit6ce638367382ea8015cf64619e9bca4e207ef36f (patch)
treeeb5b4c45bd2078e8a53994b6237a9969cd5c2c57 /fs/udf/dir.c
parent5dce54b71e6185dae07ad12ca17ce30aa64022cd (diff)
downloadlinux-6ce638367382ea8015cf64619e9bca4e207ef36f.tar.bz2
udf: Make udf_get_filename() return error instead of 0 length file name
Zero length file name isn't really valid. So check the length of the final file name generated by udf_translate_to_linux() and return -EINVAL instead of zero length file name. Update caller of udf_get_filename() to not check for 0 return value. Signed-off-by: Fabian Frederick <fabf@skynet.be> Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'fs/udf/dir.c')
-rw-r--r--fs/udf/dir.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/udf/dir.c b/fs/udf/dir.c
index fcf227eb2c51..541d9c65014d 100644
--- a/fs/udf/dir.c
+++ b/fs/udf/dir.c
@@ -168,7 +168,7 @@ static int udf_readdir(struct file *file, struct dir_context *ctx)
}
flen = udf_get_filename(sb, nameptr, lfi, fname, UDF_NAME_LEN);
- if (flen <= 0)
+ if (flen < 0)
continue;
tloc = lelb_to_cpu(cfi.icb.extLocation);