projects
/
apps
/
madmutt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
make m_dupstr return NULL if the string was empty.
[apps/madmutt.git]
/
crypt-gpgme.c
diff --git
a/crypt-gpgme.c
b/crypt-gpgme.c
index
18ca2a5
..
d01792b
100644
(file)
--- a/
crypt-gpgme.c
+++ b/
crypt-gpgme.c
@@
-22,6
+22,7
@@
#include <lib-lib/str.h>
#include <lib-lib/ascii.h>
#include <lib-lib/macros.h>
#include <lib-lib/str.h>
#include <lib-lib/ascii.h>
#include <lib-lib/macros.h>
+#include <lib-lib/file.h>
#include "mutt.h"
#include "mutt_crypt.h"
#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) {
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);
}
}
}
}