diff options
author | Werner Koch <[email protected]> | 2021-01-27 10:45:33 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2021-01-27 10:45:33 +0000 |
commit | 9037be5f40da409a7734a2672e64345472f294fc (patch) | |
tree | 12237c1676cdf543c694881b03dd8b16a790ebf2 | |
parent | po: Update Japanese Translation. (diff) | |
download | gnupg-9037be5f40da409a7734a2672e64345472f294fc.tar.gz gnupg-9037be5f40da409a7734a2672e64345472f294fc.zip |
gpg: Fix ugly error message for an unknown symkey algorithm.
* g10/mainproc.c (proc_symkey_enc): Do not continue with an unknown
algorithm.
--
Trying to encrypt data created with
printf "\x8c\x49\x05\x0e\x0a\x03\x01"
fails in version 2.2.19 with
gpg: packet(3) with unknown version 5
but with later versions with
gpg: encrypted with unknown algorithm 14
gpg: Ohhhh jeeee: ... this is a bug \
([...]/passphrase.c:433:passphrase_to_dek)
so we better catch this case earlier.
Reported-by: Tavis Ormandy
Signed-off-by: Werner Koch <[email protected]>
-rw-r--r-- | g10/mainproc.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/g10/mainproc.c b/g10/mainproc.c index 762fc79c8..80c660848 100644 --- a/g10/mainproc.c +++ b/g10/mainproc.c @@ -393,7 +393,10 @@ proc_symkey_enc (CTX c, PACKET *pkt) } } else - log_error (_("encrypted with unknown algorithm %d\n"), algo); + { + log_error (_("encrypted with unknown algorithm %d\n"), algo); + s = NULL; /* Force a goto leave. */ + } if (openpgp_md_test_algo (enc->s2k.hash_algo)) { |