Skip to content
  • Jan Kara's avatar
    udf: Allow mounting volumes with incorrect identification strings · 47fb2ff8
    Jan Kara authored
    commit b54e41f5efcb4316b2f30b30c2535cc194270373 upstream.
    
    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: default avatarJan Kara <jack@suse.cz>
    Signed-off-by: default avatarSudip Mukherjee <sudipm.mukherjee@gmail.com>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    47fb2ff8