|
@@ -827,16 +827,20 @@ static int udf_load_pvoldesc(struct super_block *sb, sector_t block)
|
|
|
|
|
|
|
|
|
|
ret = udf_dstrCS0toChar(sb, outstr, 31, pvoldesc->volIdent, 32);
|
|
ret = udf_dstrCS0toChar(sb, outstr, 31, pvoldesc->volIdent, 32);
|
|
- if (ret < 0)
|
|
|
|
- goto out_bh;
|
|
|
|
-
|
|
|
|
- strncpy(UDF_SB(sb)->s_volume_ident, outstr, ret);
|
|
|
|
|
|
+ if (ret < 0) {
|
|
|
|
+ strcpy(UDF_SB(sb)->s_volume_ident, "InvalidName");
|
|
|
|
+ pr_warn("incorrect volume identification, setting to "
|
|
|
|
+ "'InvalidName'\n");
|
|
|
|
+ } else {
|
|
|
|
+ strncpy(UDF_SB(sb)->s_volume_ident, outstr, ret);
|
|
|
|
+ }
|
|
udf_debug("volIdent[] = '%s'\n", UDF_SB(sb)->s_volume_ident);
|
|
udf_debug("volIdent[] = '%s'\n", UDF_SB(sb)->s_volume_ident);
|
|
|
|
|
|
ret = udf_dstrCS0toChar(sb, outstr, 127, pvoldesc->volSetIdent, 128);
|
|
ret = udf_dstrCS0toChar(sb, outstr, 127, pvoldesc->volSetIdent, 128);
|
|
- if (ret < 0)
|
|
|
|
|
|
+ if (ret < 0) {
|
|
|
|
+ ret = 0;
|
|
goto out_bh;
|
|
goto out_bh;
|
|
-
|
|
|
|
|
|
+ }
|
|
outstr[ret] = 0;
|
|
outstr[ret] = 0;
|
|
udf_debug("volSetIdent[] = '%s'\n", outstr);
|
|
udf_debug("volSetIdent[] = '%s'\n", outstr);
|
|
|
|
|