keybase / go-crypto

[mirror] Go supplementary cryptography libraries
https://godoc.org/golang.org/x/crypto
BSD 3-Clause "New" or "Revised" License
50 stars 20 forks source link

Fix infinite loop in armor.lineReader.Read #61

Closed btoews closed 6 years ago

btoews commented 6 years ago

Malformed armor wrapping can cause armor.lineReader.Read to loop forever. This was introduced in https://github.com/keybase/go-crypto/pull/33. When trying to strip whitespace between the checksum and the trailer io.EOF errors are just ignored.

/cc @brianmario @ptoomey3

maxtaco commented 6 years ago

See #62. Thanks for the PR!

maxtaco commented 6 years ago

Vendor: https://github.com/keybase/client/pull/10395