You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The ArmoredInputStream does a checksum verification in its read() method.
Unfortunately, a mismatching CRC checksum results in an IOException being thrown.
This is unfortunate, because the default implementation of InputStream.read(bytes, offset, length)silently swallowsIOExceptions. Therefore the CRC checksum error goes unnoticed.
I see two ways of fixing this:
Throw a custom exception not derived from IOException. This will likely break existing implementations, as a new runtime exception type needs to be introduced.
Override ArmoredInputStream.read(bytes, offset, length) to not swallow IOExceptions. This is probably the preferred way to solve the issue.
Hey!
The ArmoredInputStream does a checksum verification in its
read()
method.Unfortunately, a mismatching CRC checksum results in an
IOException
being thrown.This is unfortunate, because the default implementation of
InputStream.read(bytes, offset, length)
silently swallowsIOExceptions
. Therefore the CRC checksum error goes unnoticed.I see two ways of fixing this:
IOException
. This will likely break existing implementations, as a new runtime exception type needs to be introduced.ArmoredInputStream.read(bytes, offset, length)
to not swallow IOExceptions. This is probably the preferred way to solve the issue.See pgpainless/pgpainless#159 (comment)
The text was updated successfully, but these errors were encountered: