scd: fix change_keyattr.

* scd/app-openpgp.c (change_keyattr_from_string): Fix parsing.
This commit is contained in:
NIIBE Yutaka 2015-11-04 10:48:59 +09:00
parent 44ad9f29d4
commit c5a9fedba6
1 changed files with 2 additions and 2 deletions

View File

@ -2793,8 +2793,8 @@ change_keyattr_from_string (app_t app,
/* Because this function deletes the key we require the string
"--force" in the data to make clear that something serious might
happen. */
sscanf (string, " --force %d %d %n", &key, &algo, &n);
if (n < 13)
sscanf (string, "--force %d %d %n", &key, &algo, &n);
if (n < 12)
{
err = gpg_error (GPG_ERR_INV_DATA);
goto leave;