g10: Assert preconditions.

* g10/getkey.c (get_pubkey_byname): Assert preconditions.

Signed-off-by: Justus Winter <justus@g10code.com>
This commit is contained in:
Justus Winter 2016-10-27 14:43:29 +02:00
parent cf20b23c14
commit 66a0091d74
1 changed files with 3 additions and 0 deletions

View File

@ -1203,6 +1203,9 @@ get_pubkey_byname (ctrl_t ctrl, GETKEY_CTX * retctx, PKT_public_key * pk,
int nodefault = 0;
int anylocalfirst = 0;
/* If RETCTX is not NULL, then RET_KDBHD must be NULL. */
log_assert (retctx == NULL || ret_kdbhd == NULL);
if (retctx)
*retctx = NULL;