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-mount.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/vfs-mount.c') diff --git a/src/vfs-mount.c b/src/vfs-mount.c index b9136895..327e3531 100644 --- a/src/vfs-mount.c +++ b/src/vfs-mount.c @@ -147,6 +147,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); @@ -232,6 +235,10 @@ gpgme_op_vfs_mount (gpgme_ctx_t ctx, const char *container_file, TRACE_BEG4 (DEBUG_CTX, "gpgme_op_vfs_mount", ctx, "container=%s, mount_dir=%s, flags=0x%x, op_err=%p", container_file, mount_dir, flags, op_err); + + if (!ctx) + return TRACE_ERR (gpg_error (GPG_ERR_INV_VALUE)); + err = _gpgme_op_vfs_mount (ctx, container_file, mount_dir, flags, op_err); return TRACE_ERR (err); } -- cgit v1.2.3