aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2020-02-12 14:17:25 +0000
committerWerner Koch <[email protected]>2020-02-12 14:17:25 +0000
commit125c959677d55a8cf663c2dc248a3fc6f9be50bb (patch)
tree9f72d437c9b445dbd885ca92ad21ca9c29d23039
parentcard: List more info for an OpenPGP key. (diff)
downloadgnupg-125c959677d55a8cf663c2dc248a3fc6f9be50bb.tar.gz
gnupg-125c959677d55a8cf663c2dc248a3fc6f9be50bb.zip
card: Fix parsing of the received card_list.
* tools/card-call-scd.c (scd_cardlist): Allow for SERIALNO without any apps. Signed-off-by: Werner Koch <[email protected]>
-rw-r--r--tools/card-call-scd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/card-call-scd.c b/tools/card-call-scd.c
index 54380c5c9..237f792f5 100644
--- a/tools/card-call-scd.c
+++ b/tools/card-call-scd.c
@@ -1482,7 +1482,7 @@ card_cardlist_cb (void *opaque, const char *line)
{
/* Format of the stored string is the S/N, a space, and a
* space separated list of appnames. */
- if (*s != ' ' || spacep (s+1) || !s[1])
+ if (*s && (*s != ' ' || spacep (s+1) || !s[1]))
parm->error = gpg_error (GPG_ERR_ASS_PARAMETER);
else /* We assume the rest of the line is well formatted. */
add_to_strlist (&parm->list, line);