diff --git a/fs/udf/unicode.c b/fs/udf/unicode.c index 5fcfa96463ebb820cef33b83460fc8d1a9bea8b2..85521d6b023707c39a7809e441449b0d72ef3703 100644 --- a/fs/udf/unicode.c +++ b/fs/udf/unicode.c @@ -247,7 +247,7 @@ static int udf_name_from_CS0(struct super_block *sb, } if (translate) { - if (str_o_len <= 2 && str_o[0] == '.' && + if (str_o_len > 0 && str_o_len <= 2 && str_o[0] == '.' && (str_o_len == 1 || str_o[1] == '.')) needsCRC = 1; if (needsCRC) {