diff options
Diffstat (limited to 'g10/import.c')
-rw-r--r-- | g10/import.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/g10/import.c b/g10/import.c index c24a4b751..0dc02d927 100644 --- a/g10/import.c +++ b/g10/import.c @@ -2348,7 +2348,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); } |