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/decrypt-verify.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/decrypt-verify.c') diff --git a/src/decrypt-verify.c b/src/decrypt-verify.c index 87d5223b..a5a751b3 100644 --- a/src/decrypt-verify.c +++ b/src/decrypt-verify.c @@ -91,6 +91,10 @@ gpgme_op_decrypt_verify_start (gpgme_ctx_t ctx, gpgme_data_t cipher, TRACE_BEG2 (DEBUG_CTX, "gpgme_op_decrypt_verify_start", ctx, "cipher=%p, plain=%p", cipher, plain); + + if (!ctx) + return TRACE_ERR (gpg_error (GPG_ERR_INV_VALUE)); + err = decrypt_verify_start (ctx, 0, cipher, plain); return TRACE_ERR (err); } @@ -106,6 +110,10 @@ gpgme_op_decrypt_verify (gpgme_ctx_t ctx, gpgme_data_t cipher, TRACE_BEG2 (DEBUG_CTX, "gpgme_op_decrypt_verify", ctx, "cipher=%p, plain=%p", cipher, plain); + + if (!ctx) + return TRACE_ERR (gpg_error (GPG_ERR_INV_VALUE)); + err = decrypt_verify_start (ctx, 1, cipher, plain); if (!err) err = _gpgme_wait_one (ctx); -- cgit v1.2.3