[git] GnuPG - branch, master, updated. gnupg-2.1.15-84-g97a67d4
by Werner Koch
cvs at cvs.gnupg.org
Wed Sep 7 08:44:45 CEST 2016
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, master has been updated
via 97a67d42dc946b2d6ed81723d86e37002b5931b3 (commit)
via c894fa8d375e94d5577249c729e48ce882c07a56 (commit)
from 13ddc17ddb266d74033d5739fec932034fa85c72 (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 97a67d42dc946b2d6ed81723d86e37002b5931b3
Author: Werner Koch <wk at gnupg.org>
Date: Wed Sep 7 08:41:48 2016 +0200
gpg: Fix format string issues in tofu.
* g10/tofu.c (write_stats_status): Use ulong for MESSSAGES. Fix
format strings. Simplify by using the new write_status_printf.
Signed-off-by: Werner Koch <wk at gnupg.org>
diff --git a/g10/tofu.c b/g10/tofu.c
index 3dc0365..6ec7f7c 100644
--- a/g10/tofu.c
+++ b/g10/tofu.c
@@ -2411,11 +2411,12 @@ write_stats_status (estream_t fp,
unsigned long encryption_most_recent)
{
const char *validity;
+ unsigned long messages;
/* Use the euclidean distance rather then the sum of the magnitudes
to ensure a balance between verified signatures and encrypted
messages. */
- float messages = sqrtu32 (signature_count) + sqrtu32 (encryption_count);
+ messages = sqrtu32 (signature_count) + sqrtu32 (encryption_count);
if (messages < 1)
validity = "1"; /* Key without history. */
@@ -2428,7 +2429,7 @@ write_stats_status (estream_t fp,
if (fp)
{
- es_fprintf (fp, "tfs:1:%s:%ld:%ld:%s:%lu:%lu:%lu:%lu:\n",
+ es_fprintf (fp, "tfs:1:%s:%lu:%lu:%s:%lu:%lu:%lu:%lu:\n",
validity, signature_count, encryption_count,
tofu_policy_str (policy),
signature_first_seen, signature_most_recent,
@@ -2436,25 +2437,16 @@ write_stats_status (estream_t fp,
}
else
{
- char numbuf1[35];
- char numbuf2[35];
- char numbuf3[35];
- char numbuf4[35];
- char numbuf5[35];
- char numbuf6[35];
-
- snprintf (numbuf1, sizeof numbuf1, " %ld", signature_count);
- snprintf (numbuf2, sizeof numbuf2, " %ld", encryption_count);
- snprintf (numbuf3, sizeof numbuf3, " %lu", signature_first_seen);
- snprintf (numbuf4, sizeof numbuf4, " %lu", signature_most_recent);
- snprintf (numbuf5, sizeof numbuf5, " %lu", encryption_first_done);
- snprintf (numbuf6, sizeof numbuf6, " %lu", encryption_most_recent);
-
- write_status_strings (STATUS_TOFU_STATS,
- validity, numbuf1, numbuf2,
- " ", tofu_policy_str (policy),
- numbuf3, numbuf4, numbuf5, numbuf6,
- NULL);
+ write_status_printf (STATUS_TOFU_STATS,
+ "%s %lu %lu %s %lu %lu %lu %lu",
+ validity,
+ signature_count,
+ encryption_count,
+ tofu_policy_str (policy),
+ signature_first_seen,
+ signature_most_recent,
+ encryption_first_done,
+ encryption_most_recent);
}
}
commit c894fa8d375e94d5577249c729e48ce882c07a56
Author: Werner Koch <wk at gnupg.org>
Date: Wed Sep 7 08:40:18 2016 +0200
g10: Temporary hack to repalce missing sqrtu32.
--
Signed-off-by: Werner Koch <wk at gnupg.org>
diff --git a/g10/Makefile.am b/g10/Makefile.am
index 7b87e6a..95944b8 100644
--- a/g10/Makefile.am
+++ b/g10/Makefile.am
@@ -74,7 +74,8 @@ trust_source = trustdb.c trustdb.h tdbdump.c tdbio.c tdbio.h
endif
if USE_TOFU
-tofu_source = tofu.h tofu.c gpgsql.c gpgsql.h sqrtu32.c sqrtu32.h
+tofu_source = tofu.h tofu.c gpgsql.c gpgsql.h
+#sqrtu32.c sqrtu32.h
else
tofu_source =
endif
diff --git a/g10/tofu.c b/g10/tofu.c
index 9e07d21..3dc0365 100644
--- a/g10/tofu.c
+++ b/g10/tofu.c
@@ -41,7 +41,9 @@
#include "mkdir_p.h"
#include "gpgsql.h"
#include "status.h"
-#include "sqrtu32.h"
+/* #include "sqrtu32.h" */
+#define sqrtu32(a) (a) /* TEMP hack due to missing commit. */
+
#include "tofu.h"
-----------------------------------------------------------------------
Summary of changes:
g10/Makefile.am | 3 ++-
g10/tofu.c | 38 ++++++++++++++++----------------------
2 files changed, 18 insertions(+), 23 deletions(-)
hooks/post-receive
--
The GNU Privacy Guard
http://git.gnupg.org
More information about the Gnupg-commits
mailing list