Skip to content
  • Martin Emde's avatar
    e9134316
    [rubygems/rubygems] Raise Gem::Package::FormatError on EOF, indicating corrupt gem · e9134316
    Martin Emde authored
    Gem::Package::TarReader::Entry now raises EOFError or returns nil
    appropriately based on Ruby core IO.read and IO.readpartial behavior.
    
    Zlib will respond accordingly by raising Zlib::GzipFile::Error on EOF.
    
    When verifying a gem or extracting contents, raise FormatError similar
    to other cases of corrupt gems.
    
    Addresses a bug where Gem::Package would attempt to call size on nil
    instead of raising a more descriptive and useful error, leading users
    to assume the problem is internal to rubygems.
    
    Remove unused error class TarReader::UnexpectedEOF that was never raised
    since the NoMethodError on nil would happen first. Use EOFError instead.
    
    https://github.com/rubygems/rubygems/commit/dc6129644b
    e9134316
    [rubygems/rubygems] Raise Gem::Package::FormatError on EOF, indicating corrupt gem
    Martin Emde authored
    Gem::Package::TarReader::Entry now raises EOFError or returns nil
    appropriately based on Ruby core IO.read and IO.readpartial behavior.
    
    Zlib will respond accordingly by raising Zlib::GzipFile::Error on EOF.
    
    When verifying a gem or extracting contents, raise FormatError similar
    to other cases of corrupt gems.
    
    Addresses a bug where Gem::Package would attempt to call size on nil
    instead of raising a more descriptive and useful error, leading users
    to assume the problem is internal to rubygems.
    
    Remove unused error class TarReader::UnexpectedEOF that was never raised
    since the NoMethodError on nil would happen first. Use EOFError instead.
    
    https://github.com/rubygems/rubygems/commit/dc6129644b
Loading