X-Git-Url: http://git.madism.org/?a=blobdiff_plain;f=imap%2Fauth_gss.c;h=e687fbdea0a7204e8378c3ec07e04e7303252083;hb=b1dfcb5c755ef8c2be60369432bc91e434b72a1f;hp=a6a290862fbf889032f49704683b287344d596bb;hpb=6833ce8bdca2d64e14485118f2a4417b7e1cb1b1;p=apps%2Fmadmutt.git diff --git a/imap/auth_gss.c b/imap/auth_gss.c index a6a2908..e687fbd 100644 --- a/imap/auth_gss.c +++ b/imap/auth_gss.c @@ -18,8 +18,9 @@ /* GSS login/authentication code */ -/* for HAVE_HEIMDAL */ -#include "config.h" +#if HAVE_CONFIG_H +# include "config.h" +#endif #include "mutt.h" #include "imap_private.h" @@ -122,7 +123,7 @@ imap_auth_res_t imap_auth_gss (IMAP_DATA* idata, const char* method) mutt_to_base64 ((unsigned char*) buf1, send_token.value, send_token.length, sizeof (buf1) - 2); gss_release_buffer (&min_stat, &send_token); - strncat (buf1, "\r\n", sizeof (buf1)); + safe_strcat (buf1, sizeof (buf1), "\r\n"); mutt_socket_write (idata->conn, buf1); while (maj_stat == GSS_S_CONTINUE_NEEDED) @@ -158,7 +159,7 @@ imap_auth_res_t imap_auth_gss (IMAP_DATA* idata, const char* method) mutt_to_base64 ((unsigned char*) buf1, send_token.value, send_token.length, sizeof (buf1) - 2); gss_release_buffer (&min_stat, &send_token); - strncat (buf1, "\r\n", sizeof (buf1)); + safe_strcat (buf1, sizeof (buf1), "\r\n"); mutt_socket_write (idata->conn, buf1); } @@ -226,7 +227,7 @@ imap_auth_res_t imap_auth_gss (IMAP_DATA* idata, const char* method) sizeof (buf1) - 2); dprint (2, (debugfile, "Requesting authorisation as %s\n", idata->conn->account.user)); - strncat (buf1, "\r\n", sizeof (buf1)); + safe_strcat (buf1, sizeof (buf1), "\r\n"); mutt_socket_write (idata->conn, buf1); /* Joy of victory or agony of defeat? */