diff options
| author | Martin Emde <martin.emde@gmail.com> | 2023-08-15 10:39:46 -0700 |
|---|---|---|
| committer | git <svn-admin@ruby-lang.org> | 2023-08-17 23:16:57 +0000 |
| commit | e913431687f2fffb1a8cc435e60c95eea887b087 (patch) | |
| tree | 1df72eed6c68958b0d38efe6d9600541a446da4e /parser_bits.h | |
| parent | e504c368943acd489c9be5bc249425e885605ff1 (diff) | |
[rubygems/rubygems] Raise Gem::Package::FormatError on EOF, indicating corrupt gem
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
Diffstat (limited to 'parser_bits.h')
0 files changed, 0 insertions, 0 deletions
