• Jan Kara's avatar
    udf: Allow mounting volumes with incorrect identification strings · b54e41f5
    Jan Kara authored
    Commit c26f6c61 ("udf: Fix conversion of 'dstring' fields to UTF8")
    started to be more strict when checking whether converted strings are
    properly formatted. Sudip reports that there are DVDs where the volume
    identification string is actually too long - UDF reports:
    
    [  632.309320] UDF-fs: incorrect dstring lengths (32/32)
    
    during mount and fails the mount. This is mostly harmless failure as we
    don't need volume identification (and even less volume set
    identification) for anything. So just truncate the volume identification
    string if it is too long and replace it with 'Invalid' if we just cannot
    convert it for other reasons. This keeps slightly incorrect media still
    mountable.
    
    CC: stable@vger.kernel.org
    Fixes: c26f6c61 ("udf: Fix conversion of 'dstring' fields to UTF8")
    Reported-and-tested-by: default avatarSudip Mukherjee <sudipm.mukherjee@gmail.com>
    Signed-off-by: Jan Kara's avatarJan Kara <jack@suse.cz>
    b54e41f5
unicode.c 9.21 KB