From: Michihiro NAKAJIMA Date: Tue, 6 Oct 2009 18:58:57 +0000 (-0400) Subject: Allow longer Joliet names which is up to 103 UCS2 characters(206 bytes) X-Git-Tag: v2.8.0~324 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8cd094af06a8da6f128be972c6b6a0c3978e53cc;p=thirdparty%2Flibarchive.git Allow longer Joliet names which is up to 103 UCS2 characters(206 bytes) from 64 UCS2 characters(103 bytes). mkisofs can record that longer Joliet names by their option -joliet-long. SVN-Revision: 1484 --- diff --git a/libarchive/archive_read_support_format_iso9660.c b/libarchive/archive_read_support_format_iso9660.c index c83ddfaaa..92576ee2f 100644 --- a/libarchive/archive_read_support_format_iso9660.c +++ b/libarchive/archive_read_support_format_iso9660.c @@ -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) &&