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/opassuan.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/opassuan.c')
-rw-r--r-- | src/opassuan.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/opassuan.c b/src/opassuan.c index bd50089b..21c25cab 100644 --- a/src/opassuan.c +++ b/src/opassuan.c @@ -95,6 +95,9 @@ gpgme_op_assuan_transact_start (gpgme_ctx_t ctx, command, data_cb, data_cb_value, inq_cb, inq_cb_value, status_cb, status_cb_value); + if (!ctx) + return TRACE_ERR (gpg_error (GPG_ERR_INV_VALUE)); + err = opassuan_start (ctx, 0, command, data_cb, data_cb_value, inq_cb, inq_cb_value, status_cb, status_cb_value); return TRACE_ERR (err); @@ -122,6 +125,9 @@ gpgme_op_assuan_transact_ext (gpgme_ctx_t ctx, command, data_cb, data_cb_value, inq_cb, inq_cb_value, status_cb, status_cb_value, op_err_p); + if (!ctx) + return TRACE_ERR (gpg_error (GPG_ERR_INV_VALUE)); + err = opassuan_start (ctx, 1, command, data_cb, data_cb_value, inq_cb, inq_cb_value, @@ -212,6 +218,9 @@ gpgme_op_assuan_transact (gpgme_ctx_t ctx, TRACE (DEBUG_CTX, "gpgme_op_assuan_transact", ctx); + if (!ctx) + return gpg_error (GPG_ERR_INV_VALUE); + /* Users of the old-style session based interfaces need to look at the result structure. */ err = gpgme_op_assuan_transact_ext (ctx, command, data_cb, data_cb_value, |