diff options
author | Marcus Brinkmann <[email protected]> | 2011-05-26 14:01:26 +0000 |
---|---|---|
committer | Marcus Brinkmann <[email protected]> | 2011-05-26 14:01:26 +0000 |
commit | b34add3fe438a693e236a835135bd11b4e177daa (patch) | |
tree | 8b66e12d5c62112f33d244340b96638ac30454d8 /src/keylist.c | |
parent | Fix I/O callback example. (diff) | |
download | gpgme-b34add3fe438a693e236a835135bd11b4e177daa.tar.gz gpgme-b34add3fe438a693e236a835135bd11b4e177daa.zip |
Check context pointers for null pointer on entry points.
Diffstat (limited to 'src/keylist.c')
-rw-r--r-- | src/keylist.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/keylist.c b/src/keylist.c index 8f61a261..29e30a0f 100644 --- a/src/keylist.c +++ b/src/keylist.c @@ -863,6 +863,9 @@ gpgme_op_keylist_start (gpgme_ctx_t ctx, const char *pattern, int secret_only) TRACE_BEG2 (DEBUG_CTX, "gpgme_op_keylist_start", ctx, "pattern=%s, secret_only=%i", pattern, secret_only); + if (!ctx) + return TRACE_ERR (gpg_error (GPG_ERR_INV_VALUE)); + err = _gpgme_op_reset (ctx, 2); if (err) return TRACE_ERR (err); @@ -900,6 +903,9 @@ gpgme_op_keylist_ext_start (gpgme_ctx_t ctx, const char *pattern[], TRACE_BEG2 (DEBUG_CTX, "gpgme_op_keylist_ext_start", ctx, "secret_only=%i, reserved=0x%x", secret_only, reserved); + if (!ctx) + return TRACE_ERR (gpg_error (GPG_ERR_INV_VALUE)); + err = _gpgme_op_reset (ctx, 2); if (err) return TRACE_ERR (err); |