make m_dupstr return NULL if the string was empty.
[apps/madmutt.git] / imap / auth_cram.c
index 2b8e130..ba2f42e 100644 (file)
 #include "imap_private.h"
 #include "auth.h"
 
-#include "md5.h"
 #define MD5_BLOCK_LEN 64
 #define MD5_DIGEST_LEN 16
 
 #include <lib-lib/macros.h>
+#include <lib-hash/hash.h>
 #include "lib/debug.h"
 
 /* forward declarations */
@@ -102,7 +102,7 @@ imap_auth_res_t imap_auth_cram_md5 (IMAP_DATA * idata, const char *method)
 
   mutt_to_base64 ((unsigned char *) ibuf, (unsigned char *) obuf,
                   m_strlen(obuf), sizeof (ibuf) - 2);
-  str_cat (ibuf, sizeof (ibuf), "\r\n");
+  m_strcat(ibuf, sizeof(ibuf), "\r\n");
   mutt_socket_write (idata->conn, ibuf);
 
   do