From 8cd094af06a8da6f128be972c6b6a0c3978e53cc Mon Sep 17 00:00:00 2001 From: Michihiro NAKAJIMA Date: Tue, 6 Oct 2009 14:58:57 -0400 Subject: [PATCH] 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 --- libarchive/archive_read_support_format_iso9660.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) 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) && -- 2.47.3