X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=crypt-gpgme.c;h=d01792b040fccb64aa14f13c7e1ee0a51acc31e9;hp=9728bcce89e9fec7eadb0442fce0ddf10ab3dba9;hb=b07d69b15852a06183f7b2298436e18150c36958;hpb=ae0ce4dfcafa0c3820f107c5bfa8bd06e5272b57 diff --git a/crypt-gpgme.c b/crypt-gpgme.c index 9728bcc..d01792b 100644 --- a/crypt-gpgme.c +++ b/crypt-gpgme.c @@ -687,8 +687,7 @@ static int get_micalg (gpgme_ctx_t ctx, char *buf, size_t buflen) if (result) { algorithm_name = gpgme_hash_algo_name (result->signatures->hash_algo); if (algorithm_name) { - strncpy (buf, algorithm_name, buflen - 1); - buf[buflen - 1] = 0; + m_strcpy(buf, buflen, algorithm_name); } }