]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Allow longer Joliet names which is up to 103 UCS2 characters(206 bytes)
authorMichihiro NAKAJIMA <ggcueroad@gmail.com>
Tue, 6 Oct 2009 18:58:57 +0000 (14:58 -0400)
committerMichihiro NAKAJIMA <ggcueroad@gmail.com>
Tue, 6 Oct 2009 18:58:57 +0000 (14:58 -0400)
from 64 UCS2 characters(103 bytes). mkisofs can record that longer
Joliet names by their option -joliet-long.

SVN-Revision: 1484

libarchive/archive_read_support_format_iso9660.c

index c83ddfaaa00c97268bd85a6a211810f3b2808f75..92576ee2fd365c422d982d64a035146aff7cd2ff 100644 (file)
@@ -1086,13 +1086,15 @@ parse_file_info(struct iso9660 *iso9660, struct file_info *parent,
 
        if (iso9660->seenJoliet) {
                /* Joliet names are max 64 chars (128 bytes) according to spec,
-                * but genisoimage (and others?) will allow you to have more.
+                * but genisoimage/mkisofs allows recording longer Joliet
+                * names which are 103 UCS2 characters(206 bytes) by their
+                * option '-joliet-long'.
                 */
-               wchar_t wbuff[64+1], *wp;
+               wchar_t wbuff[103+1], *wp;
                const unsigned char *c;
 
-               /* TODO: warn when name_len > 128 ? */
-
+               if (name_len > 206)
+                       name_len = 206;
                /* convert BE UTF-16 to wchar_t */
                for (c = p, wp = wbuff;
                                c < (p + name_len) &&