[git] GnuPG - branch, STABLE-BRANCH-1-4, updated. gnupg-1.4.22-14-g0f8fd95
by NIIBE Yutaka
cvs at cvs.gnupg.org
Fri Apr 13 03:23:32 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-1-4 has been updated
via 0f8fd95ab32a6d29dac79e19f0850037c7d0c16f (commit)
from 097c59315813b3568d1682bccd37e16411006d5b (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 0f8fd95ab32a6d29dac79e19f0850037c7d0c16f
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.
--
(backport from STABLE-BRANCH-2-2 commit:
c31abf84659dbda5503dd9f3aa3449520bcd1b84)
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 4598aff..aad8a75 100644
--- a/g10/compress.c
+++ b/g10/compress.c
@@ -313,15 +313,18 @@ int
handle_compressed( 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 G10ERR_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