summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2011-12-12 15:13:50 +0100
committerBen Hutchings <ben@decadent.org.uk>2015-02-20 00:49:32 +0000
commit6276a08d7cbf88840ea02f0ea2fb73e0db1c49eb (patch)
tree02027f718974abe68980b49e94d7fec35500f60f /fs
parentff19c553450f31186b7d1986d6de56ac130e54cd (diff)
udf: Treat symlink component of type 2 as /
commit fef2e9f3301934773e4f1b3cc5c7bffb119346b8 upstream. Currently, we ignore symlink component of type 2. But mkisofs and other OS' seem to treat it as / so do the same for compatibility. Reported-by: "Gábor S." <otnaccess@hotmail.com> Signed-off-by: Jan Kara <jack@suse.cz> Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'fs')
-rw-r--r--fs/udf/symlink.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/fs/udf/symlink.c b/fs/udf/symlink.c
index 65392556968a..d89f324bc387 100644
--- a/fs/udf/symlink.c
+++ b/fs/udf/symlink.c
@@ -41,10 +41,16 @@ static void udf_pc_to_char(struct super_block *sb, unsigned char *from,
pc = (struct pathComponent *)(from + elen);
switch (pc->componentType) {
case 1:
- if (pc->lengthComponentIdent == 0) {
- p = to;
- *p++ = '/';
- }
+ /*
+ * Symlink points to some place which should be agreed
+ * upon between originator and receiver of the media. Ignore.
+ */
+ if (pc->lengthComponentIdent > 0)
+ break;
+ /* Fall through */
+ case 2:
+ p = to;
+ *p++ = '/';
break;
case 3:
memcpy(p, "../", 3);