summaryrefslogtreecommitdiff
path: root/fs/udf/symlink.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2015-06-24 20:07:10 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2015-06-24 20:07:10 -0700
commita7296b49fb40525a5c42f650617749def3d25bcc (patch)
tree2f7e0623ab09187b62732952a092ef0114cab844 /fs/udf/symlink.c
parent1e467e68e51b116e026247d0defc806b462c095e (diff)
parent792352cb160e654f0b64182550ee702a790fe4d0 (diff)
Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs
Pull UDF fixes and cleanups from Jan Kara: "The contains some small fixes and improvements in error handling for UDF. Bundled is also one ext3 coding style fix and a fix in quota documentation" * 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs: udf: fix udf_load_pvoldesc() udf: remove double err declaration in udf_file_write_iter() UDF: support NFSv2 export fs: ext3: super: fixed a space coding style issue quota: Update documentation udf: Return error from udf_find_entry() udf: Make udf_get_filename() return error instead of 0 length file name udf: bug on exotic flag in udf_get_filename() udf: improve error management in udf_CS0toNLS() udf: improve error management in udf_CS0toUTF8() udf: unicode: update function name in comments udf: remove unnecessary test in udf_build_ustr_exact() udf: Return -ENOMEM when allocation fails in udf_get_filename()
Diffstat (limited to 'fs/udf/symlink.c')
-rw-r--r--fs/udf/symlink.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/udf/symlink.c b/fs/udf/symlink.c
index 8dfbc4025e2f..862535b3ba58 100644
--- a/fs/udf/symlink.c
+++ b/fs/udf/symlink.c
@@ -82,6 +82,9 @@ static int udf_pc_to_char(struct super_block *sb, unsigned char *from,
comp_len = udf_get_filename(sb, pc->componentIdent,
pc->lengthComponentIdent,
p, tolen);
+ if (comp_len < 0)
+ return comp_len;
+
p += comp_len;
tolen -= comp_len;
if (tolen == 0)