diff options
Diffstat (limited to 'g10/import.c')
-rw-r--r-- | g10/import.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/g10/import.c b/g10/import.c index 4cb911f51..68ecd5330 100644 --- a/g10/import.c +++ b/g10/import.c @@ -177,12 +177,12 @@ read_block( IOBUF a, compress_filter_context_t *cfx, /* make a linked list of all packets */ switch( pkt->pkttype ) { case PKT_COMPRESSED: - if( pkt->pkt.compressed->algorithm == 1 ) - cfx->pgpmode = 1; - else if( pkt->pkt.compressed->algorithm != 2 ){ + if( pkt->pkt.compressed->algorithm < 1 + || pkt->pkt.compressed->algorithm > 2 ) { rc = G10ERR_COMPR_ALGO; goto ready; } + cfx->algo = pkt->pkt.compressed->algorithm; pkt->pkt.compressed->buf = NULL; iobuf_push_filter( a, compress_filter, cfx ); free_packet( pkt ); |