X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=pop%2Fpop_auth.c;h=df6de737565268783bcfb59ef15f37a1f71b03c6;hp=d715d7e5bfa16a8940ae1cb3a03270dda4897f00;hb=62781e50bfc69cf85be21ec9a18aeb32ef789952;hpb=a384af7cde6a66b02dc98ddd3f38d7e4c3921af9 diff --git a/pop/pop_auth.c b/pop/pop_auth.c index d715d7e..df6de73 100644 --- a/pop/pop_auth.c +++ b/pop/pop_auth.c @@ -16,6 +16,9 @@ #include "md5.h" #include "pop.h" +#include "lib/mem.h" +#include "lib/intl.h" + #include #include @@ -103,11 +106,11 @@ static pop_auth_res_t pop_auth_sasl (POP_DATA * pop_data, const char *method) 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 - if (!mutt_strncmp (inbuf, "+ ", 2) + if (!safe_strncmp (inbuf, "+ ", 2) && 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 (!mutt_strncmp (inbuf, "+OK", 3)) { + if (!safe_strncmp (inbuf, "+OK", 3)) { 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 */ - 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;