Skip to content

Commit

Permalink
Always cast as an array to handle files less than 264 chars
Browse files Browse the repository at this point in the history
Signed-off-by: Brian Dwyer <[email protected]>
  • Loading branch information
bdwyertech committed Aug 28, 2018
1 parent f7b7755 commit 8446b32
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/mixlib/archive/tar.rb
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ def is_tar_archive?(io)

def read_tar_magic(io)
io.rewind
magic = io.read(512).bytes[257..264].pack("C*")
magic = Array(io.read(512).bytes[257..264]).pack("C*")
io.rewind
magic
end
Expand Down

0 comments on commit 8446b32

Please sign in to comment.