{"action":"created","issue":{"url":"https://api.github.com/repos/adamhathcock/sharpcompress/issues/126","repository_url":"https://api.github.com/repos/adamhathcock/sharpcompress","labels_url":"https://api.github.com/repos/adamhathcock/sharpcompress/issues/126/labels{/name}","comments_url":"https://api.github.com/repos/adamhathcock/sharpcompress/issues/126/comments","events_url":"https://api.github.com/repos/adamhathcock/sharpcompress/issues/126/events","html_url":"https://github.com/adamhathcock/sharpcompress/issues/126","id":132341676,"number":126,"title":"IReader.MoveToNextEntry() not terminating","user":{"login":"eklann","id":5434551,"avatar_url":"https://avatars.githubusercontent.com/u/5434551?v=3","gravatar_id":"","url":"https://api.github.com/users/eklann","html_url":"https://github.com/eklann","followers_url":"https://api.github.com/users/eklann/followers","following_url":"https://api.github.com/users/eklann/following{/other_user}","gists_url":"https://api.github.com/users/eklann/gists{/gist_id}","starred_url":"https://api.github.com/users/eklann/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eklann/subscriptions","organizations_url":"https://api.github.com/users/eklann/orgs","repos_url":"https://api.github.com/users/eklann/repos","events_url":"https://api.github.com/users/eklann/events{/privacy}","received_events_url":"https://api.github.com/users/eklann/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-02-09T06:25:03Z","updated_at":"2016-02-09T10:50:37Z","closed_at":null,"body":"I have encountered an issue with reading corrupt rar-files. When reading the entries in the file, the method IReader.MoveToNextEntry does not terminate, and the programs hangs. The program still consumes a lot of CPU, so it is doing something. I have tried to wait, but after 20 hours nothing has happened.\r\n\r\nThe following code can reproduce the issue:\r\n```C#\r\nusing SharpCompress.Archive;\r\nusing SharpCompress.Reader;\r\nusing System;\r\n\r\nnamespace NonTerminatingRar\r\n{\r\n    internal class Program\r\n    {\r\n        private static void Main(string[] args)\r\n        {\r\n            IArchive archive = ArchiveFactory.Open(args[0]);\r\n            using (IReader reader = archive.ExtractAllEntries())\r\n            {\r\n                while (reader.MoveToNextEntry())\r\n                {\r\n                    Console.WriteLine(reader.Entry.Key);\r\n                }\r\n            }\r\n        }\r\n    }\r\n}\r\n```\r\n\r\nI am using Sharpcompress 0.11.4 from nuget.org\r\n\r\nI also have a file that can be used to reproduce the problem, but I am not sure where to send it? It is approximately 100MB"},"comment":{"url":"https://api.github.com/repos/adamhathcock/sharpcompress/issues/comments/181812962","html_url":"https://github.com/adamhathcock/sharpcompress/issues/126#issuecomment-181812962","issue_url":"https://api.github.com/repos/adamhathcock/sharpcompress/issues/126","id":181812962,"user":{"login":"adamhathcock","id":527620,"avatar_url":"https://avatars.githubusercontent.com/u/527620?v=3","gravatar_id":"","url":"https://api.github.com/users/adamhathcock","html_url":"https://github.com/adamhathcock","followers_url":"https://api.github.com/users/adamhathcock/followers","following_url":"https://api.github.com/users/adamhathcock/following{/other_user}","gists_url":"https://api.github.com/users/adamhathcock/gists{/gist_id}","starred_url":"https://api.github.com/users/adamhathcock/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adamhathcock/subscriptions","organizations_url":"https://api.github.com/users/adamhathcock/orgs","repos_url":"https://api.github.com/users/adamhathcock/repos","events_url":"https://api.github.com/users/adamhathcock/events{/privacy}","received_events_url":"https://api.github.com/users/adamhathcock/received_events","type":"User","site_admin":false},"created_at":"2016-02-09T10:50:37Z","updated_at":"2016-02-09T10:50:37Z","body":"If it's looping in the decompression, how do you propose detecting it?  It's not just a matter of throwing an exception \"if something bad happens.\"  The problem is knowing if something bad happens.  There is nothing that detects loops like this.  \r\n\r\nIf you want, you can see if WinRAR itself detects it and perhaps suggest checksums or something is done but then again, you don't have a checksum if you can't decompress it."}}