[git] GnuPG - branch, STABLE-BRANCH-2-2, updated. gnupg-2.2.3-4-g531182b
by Werner Koch
cvs at cvs.gnupg.org
Wed Nov 22 21:04:00 CET 2017
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 531182b7f84f3cc75268a645728cb862dd20acee (commit)
via ea28ea18f3ee6c9f5e69986f39848398b58e242e (commit)
from 0bb7fd0cab2d53cd0d44b21301b23edfe817e66b (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 531182b7f84f3cc75268a645728cb862dd20acee
Author: Werner Koch <wk at gnupg.org>
Date: Wed Nov 22 20:54:39 2017 +0100
build: Update distsigkey.gpg
--
diff --git a/g10/distsigkey.gpg b/g10/distsigkey.gpg
index 17de53f..219b7ed 100644
Binary files a/g10/distsigkey.gpg and b/g10/distsigkey.gpg differ
commit ea28ea18f3ee6c9f5e69986f39848398b58e242e
Author: Werner Koch <wk at gnupg.org>
Date: Wed Nov 22 20:54:07 2017 +0100
gpg: Fix memory leaking for long inputs via --command-fd.
* g10/cpr.c (do_get_from_fd): Free the old buffer.
--
If the received input is longer than 200 characters we used to leak
the previous allocated buffer.
GnuPG-bug-id: 3528
Signed-off-by: Werner Koch <wk at gnupg.org>
diff --git a/g10/cpr.c b/g10/cpr.c
index 1548720..a7fd1aa 100644
--- a/g10/cpr.c
+++ b/g10/cpr.c
@@ -425,11 +425,17 @@ do_get_from_fd ( const char *keyword, int hidden, int getbool )
{
if (i >= len-1 )
{
+ /* On the first iteration allocate a new buffer. If that
+ * buffer is too short at further iterations do a poor man's
+ * realloc. */
char *save = string;
len += 100;
string = hidden? xmalloc_secure ( len ) : xmalloc ( len );
if (save)
- memcpy (string, save, i );
+ {
+ memcpy (string, save, i);
+ xfree (save);
+ }
else
i = 0;
}
-----------------------------------------------------------------------
Summary of changes:
g10/cpr.c | 8 +++++++-
g10/distsigkey.gpg | Bin 3452 -> 3267 bytes
2 files changed, 7 insertions(+), 1 deletion(-)
hooks/post-receive
--
The GNU Privacy Guard
http://git.gnupg.org
More information about the Gnupg-commits
mailing list