projects
/
apps
/
madmutt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Rocco Rutte
[apps/madmutt.git]
/
imap
/
auth_cram.c
diff --git
a/imap/auth_cram.c
b/imap/auth_cram.c
index
003e20d
..
3843ca3
100644
(file)
--- a/
imap/auth_cram.c
+++ b/
imap/auth_cram.c
@@
-16,11
+16,13
@@
#include "mutt.h"
#include "imap_private.h"
#include "auth.h"
#include "mutt.h"
#include "imap_private.h"
#include "auth.h"
-#include "md5.h"
+#include "md5.h"
#define MD5_BLOCK_LEN 64
#define MD5_DIGEST_LEN 16
#define MD5_BLOCK_LEN 64
#define MD5_DIGEST_LEN 16
+#include "lib/intl.h"
+
/* forward declarations */
static void hmac_md5 (const char *password, char *challenge,
unsigned char *response);
/* forward declarations */
static void hmac_md5 (const char *password, char *challenge,
unsigned char *response);
@@
-98,7
+100,7
@@
imap_auth_res_t imap_auth_cram_md5 (IMAP_DATA * idata, const char *method)
*/
mutt_to_base64 ((unsigned char *) ibuf, (unsigned char *) obuf,
*/
mutt_to_base64 ((unsigned char *) ibuf, (unsigned char *) obuf,
-
mutt
_strlen (obuf), sizeof (ibuf) - 2);
+
safe
_strlen (obuf), sizeof (ibuf) - 2);
safe_strcat (ibuf, sizeof (ibuf), "\r\n");
mutt_socket_write (idata->conn, ibuf);
safe_strcat (ibuf, sizeof (ibuf), "\r\n");
mutt_socket_write (idata->conn, ibuf);
@@
-131,8
+133,8
@@
static void hmac_md5 (const char *password, char *challenge,
unsigned int secret_len, chal_len;
int i;
unsigned int secret_len, chal_len;
int i;
- secret_len =
mutt
_strlen (password);
- chal_len =
mutt
_strlen (challenge);
+ secret_len =
safe
_strlen (password);
+ chal_len =
safe
_strlen (challenge);
/* passwords longer than MD5_BLOCK_LEN bytes are substituted with their MD5
* digests */
/* passwords longer than MD5_BLOCK_LEN bytes are substituted with their MD5
* digests */