* ScsiEvpd.cs: Take care of null returns on EVPD decoding.

* ViewReport.aspx.cs: Catch exceptions on USB descriptor reading.
This commit is contained in:
2017-09-11 18:31:22 +01:00
parent 489ca6d1de
commit f2d12773c6
2 changed files with 34 additions and 21 deletions

View File

@@ -471,7 +471,14 @@ namespace DiscImageChef.Server
if(_line[0] == '\t')
continue;
number = Convert.ToUInt16(_line.Substring(0, 4), 16);
try
{
number = Convert.ToUInt16(_line.Substring(0, 4), 16);
}
catch(FormatException)
{
continue;
}
if(number == vendor)
{