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 <wk@gnupg.org>
This commit is contained in:
Werner Koch 2020-02-12 15:17:25 +01:00
parent 1abfce82bd
commit 125c959677
No known key found for this signature in database
GPG Key ID: E3FDFF218E45B72B
1 changed files with 1 additions and 1 deletions

View File

@ -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);