[git] GPGME - branch, master, updated. gpgme-1.8.0-35-gca69df8
by Andre Heinecke
cvs at cvs.gnupg.org
Tue Jan 17 15:22:05 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 "GnuPG Made Easy".
The branch, master has been updated
via ca69df8c8d3f044340aee2a118cc20d33cd600a1 (commit)
from abfd241d1a1ae8e30e18b7c5e0658b8c54d89544 (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 ca69df8c8d3f044340aee2a118cc20d33cd600a1
Author: Andre Heinecke <aheinecke at intevation.de>
Date: Tue Jan 17 15:20:56 2017 +0100
tests: Add safeguards against nullptr deref
* t-gpgconf.c (main): Test some values before dereferencing them.
diff --git a/tests/gpg/t-gpgconf.c b/tests/gpg/t-gpgconf.c
index d199d2e..52f0f8b 100644
--- a/tests/gpg/t-gpgconf.c
+++ b/tests/gpg/t-gpgconf.c
@@ -309,9 +309,10 @@ main (void)
fail_if_err (err);
if (lookup (conf, "dirmngr", "verbose", &comp, &opt))
{
- /* Found. */
- test (opt->alt_type == GPGME_CONF_NONE);
- test ((unsigned long) opt->value->value.count == count);
+ /* Found. */
+ test (opt->alt_type == GPGME_CONF_NONE);
+ test (opt->value);
+ test ((unsigned long) opt->value->value.count == count);
}
fprintf (stderr, ".");
@@ -350,9 +351,11 @@ main (void)
fail_if_err (err);
if (lookup (conf, "gpg", "keyserver", &comp, &opt))
{
- /* Found. */
- test (opt->alt_type == GPGME_CONF_STRING);
- test (strcmp (opt->value->value.string, values[i%2]) == 0);
+ /* Found. */
+ test (opt->alt_type == GPGME_CONF_STRING);
+ test (opt->value);
+ test (opt->value->value.string);
+ test (strcmp (opt->value->value.string, values[i%2]) == 0);
}
fprintf (stderr, ".");
-----------------------------------------------------------------------
Summary of changes:
tests/gpg/t-gpgconf.c | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
hooks/post-receive
--
GnuPG Made Easy
http://git.gnupg.org
More information about the Gnupg-commits
mailing list