diff options
Diffstat (limited to 'g10/import.c')
-rw-r--r-- | g10/import.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/g10/import.c b/g10/import.c index 80b4f6749..c5bcb595c 100644 --- a/g10/import.c +++ b/g10/import.c @@ -364,17 +364,17 @@ read_block( IOBUF a, PACKET **pending_pkt, KBNODE *ret_root ) /* make a linked list of all packets */ switch( pkt->pkttype ) { case PKT_COMPRESSED: - if( pkt->pkt.compressed->algorithm < 1 - || pkt->pkt.compressed->algorithm > 2 ) { + if(check_compress_algo(pkt->pkt.compressed->algorithm)) + { rc = G10ERR_COMPR_ALGO; goto ready; - } - { + } + else + { compress_filter_context_t *cfx = m_alloc_clear( sizeof *cfx ); - cfx->algo = pkt->pkt.compressed->algorithm; pkt->pkt.compressed->buf = NULL; - iobuf_push_filter2( a, compress_filter, cfx, 1 ); - } + push_compress_filter2(a,cfx,pkt->pkt.compressed->algorithm,1); + } free_packet( pkt ); init_packet(pkt); break; |