aboutsummaryrefslogtreecommitdiffstats
path: root/src/debug.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2018-10-18 14:50:18 +0000
committerWerner Koch <[email protected]>2018-10-18 14:54:51 +0000
commit174af15725d4989a840ff3098996cc8a0568f724 (patch)
tree412a6576c697748479c753dfe6e51b784a62b27b /src/debug.c
parentpython: do not export HAVE_CXX11 definition (diff)
downloadgpgme-174af15725d4989a840ff3098996cc8a0568f724.tar.gz
gpgme-174af15725d4989a840ff3098996cc8a0568f724.zip
core: Return an error if NULL is provided for genkey's parms.
* src/debug.c (_gpgme_debug_buffer): Bail out of BUF is NULL. * src/genkey.c (gpgme_op_genkey): Do no deref a NULL in TRACE_LOGBUF. (gpgme_op_genkey_start): Ditto. Return an error if PARMS is NULL. -- This robustness patch should solve one part of GnuPG-bug-id: 4192 Signed-off-by: Werner Koch <[email protected]>
Diffstat (limited to 'src/debug.c')
-rw-r--r--src/debug.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/debug.c b/src/debug.c
index d7604a7c..37baabb0 100644
--- a/src/debug.c
+++ b/src/debug.c
@@ -379,6 +379,9 @@ _gpgme_debug_buffer (int lvl, const char *const fmt,
if (!_gpgme_debug_trace ())
return;
+ if (!buffer)
+ return;
+
while (idx < len)
{
char str[51];