aboutsummaryrefslogtreecommitdiffstats
path: root/fs/udf/super.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/udf/super.c')
-rw-r--r--fs/udf/super.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/fs/udf/super.c b/fs/udf/super.c
index 8f2f56d9a1bb..e3d684ea3203 100644
--- a/fs/udf/super.c
+++ b/fs/udf/super.c
@@ -827,16 +827,20 @@ static int udf_load_pvoldesc(struct super_block *sb, sector_t block)
827 827
828 828
829 ret = udf_dstrCS0toChar(sb, outstr, 31, pvoldesc->volIdent, 32); 829 ret = udf_dstrCS0toChar(sb, outstr, 31, pvoldesc->volIdent, 32);
830 if (ret < 0) 830 if (ret < 0) {
831 goto out_bh; 831 strcpy(UDF_SB(sb)->s_volume_ident, "InvalidName");
832 832 pr_warn("incorrect volume identification, setting to "
833 strncpy(UDF_SB(sb)->s_volume_ident, outstr, ret); 833 "'InvalidName'\n");
834 } else {
835 strncpy(UDF_SB(sb)->s_volume_ident, outstr, ret);
836 }
834 udf_debug("volIdent[] = '%s'\n", UDF_SB(sb)->s_volume_ident); 837 udf_debug("volIdent[] = '%s'\n", UDF_SB(sb)->s_volume_ident);
835 838
836 ret = udf_dstrCS0toChar(sb, outstr, 127, pvoldesc->volSetIdent, 128); 839 ret = udf_dstrCS0toChar(sb, outstr, 127, pvoldesc->volSetIdent, 128);
837 if (ret < 0) 840 if (ret < 0) {
841 ret = 0;
838 goto out_bh; 842 goto out_bh;
839 843 }
840 outstr[ret] = 0; 844 outstr[ret] = 0;
841 udf_debug("volSetIdent[] = '%s'\n", outstr); 845 udf_debug("volSetIdent[] = '%s'\n", outstr);
842 846