From 0fcf3ee915a1c90bd7471ec371924a1ff7a5fcdd Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Thu, 6 Aug 2009 17:17:18 +0000 Subject: Fix detection of invalid signer keys. Support the new INV_SGNR status code. --- src/op-support.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/op-support.c') diff --git a/src/op-support.c b/src/op-support.c index c3ba7785..90e1283e 100644 --- a/src/op-support.c +++ b/src/op-support.c @@ -162,8 +162,8 @@ _gpgme_op_reset (gpgme_ctx_t ctx, int type) } -/* Parse the INV_RECP status line in ARGS and return the result in - KEY. */ +/* Parse the INV_RECP or INV-SNDR status line in ARGS and return the + result in KEY. */ gpgme_error_t _gpgme_parse_inv_recp (char *args, gpgme_invalid_key_t *key) { @@ -177,7 +177,7 @@ _gpgme_parse_inv_recp (char *args, gpgme_invalid_key_t *key) inv_key->next = NULL; errno = 0; reason = strtol (args, &tail, 0); - if (errno || args == tail || *tail != ' ') + if (errno || args == tail || (*tail && *tail != ' ')) { /* The crypto backend does not behave. */ free (inv_key); @@ -236,7 +236,7 @@ _gpgme_parse_inv_recp (char *args, gpgme_invalid_key_t *key) break; } - while (*tail == ' ') + while (*tail && *tail == ' ') tail++; if (*tail) { -- cgit v1.2.3