From e1e223fb6b19393acc42649f5d0f12ab7b69df6e Mon Sep 17 00:00:00 2001 From: Richard Oliveri Date: Thu, 1 Jun 2017 11:03:02 -0400 Subject: [PATCH] Removed questionable check in NTFS code. It appears the code is attempting to test for valid data, and raising an error when the class of the returned data item is Bignum. This should only happen when the data in question is corrupt, so there shouldn't be an explicit test for it. Given the test is breaking Ruby 2.4 tests, I'm removing the test. --- lib/fs/ntfs/directory_index_node.rb | 4 ---- 1 file changed, 4 deletions(-) diff --git a/lib/fs/ntfs/directory_index_node.rb b/lib/fs/ntfs/directory_index_node.rb index 8c55eb50..9db4c2e7 100644 --- a/lib/fs/ntfs/directory_index_node.rb +++ b/lib/fs/ntfs/directory_index_node.rb @@ -52,10 +52,6 @@ def initialize(buf) # Child node VCN is located 8 bytes before 'length' bytes. # NOTE: If the node has 0 contents, it's offset 16. @child = buf[@contentLen == 0 ? 16 : @length - 8, 8].unpack('Q')[0] - if @child.class == Bignum - # buf.hex_dump(:obj => STDOUT, :meth => :puts, :newline => false) - raise "MIQ(NTFS::DirectoryIndexNode.initialize) Bad child node: #{@child}" - end end end