Fixed: Zero length file causes MediaInfo hanging in 100% cpu load.

This commit is contained in:
Taloth Saldono 2017-03-19 22:02:52 +01:00
parent a1a5e29c3e
commit 2e08f195e4
1 changed files with 6 additions and 1 deletions

View File

@ -189,6 +189,11 @@ namespace NzbDrone.Core.MediaFiles.MediaInfo
public int Open(Stream stream)
{
if (stream.Length < 1024)
{
return 0;
}
var isValid = (int)MediaInfo_Open_Buffer_Init(_handle, stream.Length, 0);
if (isValid == 1)
{