projects
/
apps
/
madmutt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Nico Golde:
[apps/madmutt.git]
/
pop
/
pop_auth.c
diff --git
a/pop/pop_auth.c
b/pop/pop_auth.c
index
d715d7e
..
df6de73
100644
(file)
--- a/
pop/pop_auth.c
+++ b/
pop/pop_auth.c
@@
-16,6
+16,9
@@
#include "md5.h"
#include "pop.h"
#include "md5.h"
#include "pop.h"
+#include "lib/mem.h"
+#include "lib/intl.h"
+
#include <string.h>
#include <unistd.h>
#include <string.h>
#include <unistd.h>
@@
-103,11
+106,11
@@
static pop_auth_res_t pop_auth_sasl (POP_DATA * pop_data, const char *method)
break;
#ifdef USE_SASL2
break;
#ifdef USE_SASL2
- if (!
mutt
_strncmp (inbuf, "+ ", 2)
+ if (!
safe
_strncmp (inbuf, "+ ", 2)
&& sasl_decode64 (inbuf, strlen (inbuf), buf, LONG_STRING - 1,
&len) != SASL_OK)
#else
&& sasl_decode64 (inbuf, strlen (inbuf), buf, LONG_STRING - 1,
&len) != SASL_OK)
#else
- if (!
mutt
_strncmp (inbuf, "+ ", 2)
+ if (!
safe
_strncmp (inbuf, "+ ", 2)
&& sasl_decode64 (inbuf, strlen (inbuf), buf, &len) != SASL_OK)
#endif
{
&& sasl_decode64 (inbuf, strlen (inbuf), buf, &len) != SASL_OK)
#endif
{
@@
-150,7
+153,7
@@
static pop_auth_res_t pop_auth_sasl (POP_DATA * pop_data, const char *method)
if (rc != SASL_OK)
goto bail;
if (rc != SASL_OK)
goto bail;
- if (!
mutt
_strncmp (inbuf, "+OK", 3)) {
+ if (!
safe
_strncmp (inbuf, "+OK", 3)) {
mutt_sasl_setup_conn (pop_data->conn, saslconn);
return POP_A_SUCCESS;
}
mutt_sasl_setup_conn (pop_data->conn, saslconn);
return POP_A_SUCCESS;
}
@@
-159,7
+162,7
@@
bail:
sasl_dispose (&saslconn);
/* terminate SASL sessoin if the last responce is not +OK nor -ERR */
sasl_dispose (&saslconn);
/* terminate SASL sessoin if the last responce is not +OK nor -ERR */
- if (!
mutt
_strncmp (inbuf, "+ ", 2)) {
+ if (!
safe
_strncmp (inbuf, "+ ", 2)) {
snprintf (buf, sizeof (buf), "*\r\n");
if (pop_query (pop_data, buf, sizeof (buf)) == PQ_NOT_CONNECTED)
return POP_A_SOCKET;
snprintf (buf, sizeof (buf), "*\r\n");
if (pop_query (pop_data, buf, sizeof (buf)) == PQ_NOT_CONNECTED)
return POP_A_SOCKET;