From b34add3fe438a693e236a835135bd11b4e177daa Mon Sep 17 00:00:00 2001 From: Marcus Brinkmann Date: Thu, 26 May 2011 16:01:26 +0200 Subject: Check context pointers for null pointer on entry points. --- src/vfs-create.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/vfs-create.c') diff --git a/src/vfs-create.c b/src/vfs-create.c index d7fd24f1..e8dab472 100644 --- a/src/vfs-create.c +++ b/src/vfs-create.c @@ -90,6 +90,9 @@ gpgme_op_vfs_transact (gpgme_ctx_t ctx, gpgme_error_t *op_err) { gpgme_error_t err; + + if (!ctx) + return gpg_error (GPG_ERR_INV_VALUE); err = vfs_start (ctx, 1, command, data_cb, data_cb_value, inq_cb, inq_cb_value, status_cb, status_cb_value); @@ -178,6 +181,9 @@ gpgme_op_vfs_create (gpgme_ctx_t ctx, gpgme_key_t recp[], "container_file=%s, flags=0x%x, op_err=%p", container_file, flags, op_err); + if (!ctx) + return TRACE_ERR (gpg_error (GPG_ERR_INV_VALUE)); + if (_gpgme_debug_trace () && recp) { int i = 0; -- cgit v1.2.3