[git] GnuPG - branch, STABLE-BRANCH-2-2, updated. gnupg-2.2.6-13-gc31abf8
by NIIBE Yutaka
cvs at cvs.gnupg.org
Fri Apr 13 03:11:00 CEST 2018
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "The GNU Privacy Guard".
The branch, STABLE-BRANCH-2-2 has been updated
via c31abf84659dbda5503dd9f3aa3449520bcd1b84 (commit)
from 40fcddd3a98b778f9f31654adf4c06037e8b8e5d (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit c31abf84659dbda5503dd9f3aa3449520bcd1b84
Author: NIIBE Yutaka <gniibe at fsij.org>
Date: Fri Apr 13 10:09:02 2018 +0900
g10: Push compress filter only if compressed.
* g10/compress.c (handle_compressed): Fix memory leak.
--
All other calls of push_compress_filter checks ALGO,
so, do it here, too.
GnuPG-bug-id: 3898
Signed-off-by: NIIBE Yutaka <gniibe at fsij.org>
diff --git a/g10/compress.c b/g10/compress.c
index 61bb756..67c9c9b 100644
--- a/g10/compress.c
+++ b/g10/compress.c
@@ -309,15 +309,18 @@ int
handle_compressed (ctrl_t ctrl, void *procctx, PKT_compressed *cd,
int (*callback)(IOBUF, void *), void *passthru )
{
- compress_filter_context_t *cfx;
int rc;
if(check_compress_algo(cd->algorithm))
return GPG_ERR_COMPR_ALGO;
- cfx = xmalloc_clear (sizeof *cfx);
- cfx->release = release_context;
- cfx->algo = cd->algorithm;
- push_compress_filter(cd->buf,cfx,cd->algorithm);
+ if(cd->algorithm) {
+ compress_filter_context_t *cfx;
+
+ cfx = xmalloc_clear (sizeof *cfx);
+ cfx->release = release_context;
+ cfx->algo = cd->algorithm;
+ push_compress_filter(cd->buf,cfx,cd->algorithm);
+ }
if( callback )
rc = callback(cd->buf, passthru );
else
-----------------------------------------------------------------------
Summary of changes:
g10/compress.c | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
hooks/post-receive
--
The GNU Privacy Guard
http://git.gnupg.org
More information about the Gnupg-commits
mailing list