diff options
Diffstat (limited to '')
-rw-r--r-- | g10/import.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/g10/import.c b/g10/import.c index a58637c9d..66aa875c4 100644 --- a/g10/import.c +++ b/g10/import.c @@ -2355,7 +2355,8 @@ auto_create_card_key_stub ( const char *serialnostr, size_t an; fingerprint_from_pk (pk, afp, &an); - memset (afp, 0, MAX_FINGERPRINT_LEN); + if (an < MAX_FINGERPRINT_LEN) + memset (afp+an, 0, MAX_FINGERPRINT_LEN-an); rc = keydb_search_fpr (hd, afp); } @@ -2410,4 +2411,3 @@ auto_create_card_key_stub ( const char *serialnostr, keydb_release (hd); return rc; } - |