X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=crypt-gpgme.c;h=d01792b040fccb64aa14f13c7e1ee0a51acc31e9;hp=0d5cd894803ab96167764652ca1327d16ff34864;hb=c6b9d35ed9361e4defab9762a7480d5126405ae9;hpb=2ea77d3b2827ba23feb756ce2fb936565ae38998 diff --git a/crypt-gpgme.c b/crypt-gpgme.c index 0d5cd89..d01792b 100644 --- a/crypt-gpgme.c +++ b/crypt-gpgme.c @@ -22,6 +22,7 @@ #include #include #include +#include #include "mutt.h" #include "mutt_crypt.h" @@ -686,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); } } @@ -3221,7 +3221,7 @@ static LIST *crypt_add_string_to_hints (LIST * hints, const char *str) for (t = strtok (scratch, " ,.:\"()<>\n"); t; t = strtok (NULL, " ,.:\"()<>\n")) { if (m_strlen(t) > 3) - hints = mutt_add_list (hints, t); + hints = mutt_add_list(hints, t); } p_delete(&scratch);