1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-11-04 20:38:50 +01:00

* mainproc.c (proc_symkey_enc): Avoid segv in case the parser

encountered an invalid packet.
This commit is contained in:
Werner Koch 2002-05-11 16:54:43 +00:00
parent 6237f835d3
commit 0a66b9aaae
2 changed files with 6 additions and 1 deletions

View File

@ -1,5 +1,8 @@
2002-05-11 Werner Koch <wk@gnupg.org>
* mainproc.c (proc_symkey_enc): Avoid segv in case the parser
encountered an invalid packet.
* keyserver.c (keyserver_export): Get confirmation before sending
all keys.

View File

@ -244,7 +244,9 @@ proc_symkey_enc( CTX c, PACKET *pkt )
PKT_symkey_enc *enc;
enc = pkt->pkt.symkey_enc;
if (enc->seskeylen)
if (!enc)
log_error ("invalid symkey encrypted packet\n");
else if (enc->seskeylen)
log_error ("symkey_enc packet with session keys are not supported!\n");
else {
int algo = enc->cipher_algo;