diff --git a/g10/ChangeLog b/g10/ChangeLog index 16c7c3c56..cffdbf3f2 100644 --- a/g10/ChangeLog +++ b/g10/ChangeLog @@ -1,3 +1,9 @@ +2004-03-25 David Shaw + + * options.h, g10.c (main), compress-bz2.c (init_uncompress): + Backport --bzip2-decompress-lowmem since we do handle receiving a + bzip2 message on the stable branch. + 2004-03-23 David Shaw * keyedit.c (no_primary_warning): Cleanup. diff --git a/g10/compress-bz2.c b/g10/compress-bz2.c index 9c9f4dcbd..ed8a9e676 100644 --- a/g10/compress-bz2.c +++ b/g10/compress-bz2.c @@ -1,5 +1,5 @@ /* compress.c - bzip2 compress filter - * Copyright (C) 2003 Free Software Foundation, Inc. + * Copyright (C) 2003, 2004 Free Software Foundation, Inc. * * This file is part of GnuPG. * @@ -101,7 +101,7 @@ init_uncompress( compress_filter_context_t *zfx, bz_stream *bzs ) { int rc; - if((rc=BZ2_bzDecompressInit(bzs,0,0))!=BZ_OK) + if((rc=BZ2_bzDecompressInit(bzs,0,opt.bz2_decompress_lowmem))!=BZ_OK) log_fatal("bz2lib problem: %d\n",rc); zfx->inbufsize = 2048; diff --git a/g10/g10.c b/g10/g10.c index aa535fa36..bf31fc8e1 100644 --- a/g10/g10.c +++ b/g10/g10.c @@ -184,6 +184,7 @@ enum cmd_and_opt_values oDigestAlgo, oCertDigestAlgo, oCompressAlgo, + oBZ2DecompressLowmem, oPasswdFD, oPasswdFile, /* only used with risc os */ oCommandFD, @@ -395,6 +396,7 @@ static ARGPARSE_OPTS opts[] = { { oNoEncryptTo, "no-encrypt-to", 0, "@" }, { oUser, "local-user",2, N_("use this user-id to sign or decrypt")}, { oCompress,"compress-level",1,N_("|N|set compress level N (0 disables)")}, + { oBZ2DecompressLowmem, "bzip2-decompress-lowmem", 0, "@" }, { oTextmodeShort, NULL, 0, "@"}, { oTextmode, "textmode", 0, N_("use canonical text mode")}, { oNoTextmode, "no-textmode", 0, "@"}, @@ -478,7 +480,7 @@ static ARGPARSE_OPTS opts[] = { { oDigestAlgo, "digest-algo", 2 , N_("|NAME|use message digest algorithm NAME")}, { oCertDigestAlgo, "cert-digest-algo", 2 , "@" }, { oCompressAlgo, "compress-algo", 1 , N_("|N|use compress algorithm N")}, - { oThrowKeyid, "throw-keyid", 0, N_("throw keyid field of encrypted packets")}, + { oThrowKeyid, "throw-keyids", 0, N_("throw keyid field of encrypted packets")}, { oShowPhotos, "show-photos", 0, N_("Show Photo IDs")}, { oNoShowPhotos, "no-show-photos", 0, N_("Don't show Photo IDs")}, { oPhotoViewer, "photo-viewer", 2, N_("Set command line to view Photo IDs")}, @@ -1765,6 +1767,7 @@ main( int argc, char **argv ) add_to_strlist2( &locusr, pargs.r.ret_str, utf8_strings ); break; case oCompress: opt.compress = pargs.r.ret_int; break; + case oBZ2DecompressLowmem: opt.bz2_decompress_lowmem=1; break; case oPasswdFD: pwfd = iobuf_translate_file_handle (pargs.r.ret_int, 0); opt.use_agent = 0; diff --git a/g10/options.h b/g10/options.h index 91ff9b309..13e9af54f 100644 --- a/g10/options.h +++ b/g10/options.h @@ -72,6 +72,7 @@ struct int def_digest_algo; int cert_digest_algo; int def_compress_algo; + int bz2_decompress_lowmem; const char *def_secret_key; char *def_recipient; int def_recipient_self;