{
int ok, len;
int mboxfd;
- char buf [POPBUFSIZE], host[HOSTLEN];
+ char buf [POPBUFSIZE+1], host[HOSTLEN+1];
int socket;
int first,number,count;
const char *fmt;
va_dcl {
- char buf [POPBUFSIZE];
+ char buf [POPBUFSIZE+1];
va_list ap;
if (protocol->tagged)
va_dcl {
int ok;
- char buf [POPBUFSIZE];
+ char buf [POPBUFSIZE+1];
va_list ap;
if (protocol->tagged)
{
const char *from;
int state = 0;
- char mycopy[POPBUFSIZE];
+ char mycopy[POPBUFSIZE+1];
if (strncmp("From: ", buf, 6)
&& strncmp("To: ", buf, 4)
static char *nxtaddr(hdr)
char *hdr;
{
- static char *hp, *tp, address[POPBUFSIZE];
+ static char *hp, *tp, address[POPBUFSIZE+1];
static state;
if (hdr)
int output;
int rewrite;
{
- char buf [MSGBUFSIZE];
- char fromBuf[MSGBUFSIZE];
+ char buf [MSGBUFSIZE+1];
+ char fromBuf[MSGBUFSIZE+1];
char *bufp, *headers, *unixfrom, *fromhdr, *tohdr, *cchdr, *bcchdr;
int n, oldlen;
int inheaders;
tmpdir = "/tmp";
strcpy(tmpbuf, tmpdir);
strcat(tmpbuf, "/poplock-");
- gethostname(tmpbuf + strlen(tmpbuf), HOSTLEN);
+ gethostname(tmpbuf + strlen(tmpbuf), HOSTLEN+1);
if ((user = getenv("USER")) != (char *)NULL)
{
strcat(tmpbuf, "-");
for (i = 0; i < sizeof(autoprobe)/sizeof(autoprobe[0]); i++)
{
queryctl->protocol = autoprobe[i];
- if ((st = query_host(queryctl)) == PS_SUCCESS || st == PS_NOMAIL)
+ if ((st = query_host(queryctl)) == PS_SUCCESS || st == PS_NOMAIL || st == PS_AUTHFAIL)
break;
}
queryctl->protocol = P_AUTO;
struct hostrec
{
- char servername [HOSTLEN];
- char localname [USERNAMELEN];
- char remotename [USERNAMELEN];
- char password [PASSWORDLEN];
- char rpopid [PASSWORDLEN];
- char userfolder [FOLDERLEN];
+ char servername [HOSTLEN+1];
+ char localname [USERNAMELEN+1];
+ char remotename [USERNAMELEN+1];
+ char password [PASSWORDLEN+1];
+ char rpopid [PASSWORDLEN+1];
+ char userfolder [FOLDERLEN+1];
char remotefolder [FOLDERLEN];
- char smtphost[HOSTLEN];
- char mda [MDALEN];
+ char smtphost[HOSTLEN+1];
+ char mda [MDALEN+1];
int keep;
int protocol;
int fetchall;
int socket;
{
int ok;
- char buf [POPBUFSIZE];
+ char buf [POPBUFSIZE+1];
char *bufp;
int n;
int limit;
int *lenp;
{
- char buf [POPBUFSIZE];
+ char buf [POPBUFSIZE+1];
int num;
if (limit)
struct hostrec *queryctl;
int number;
{
- char buf [POPBUFSIZE];
+ char buf [POPBUFSIZE+1];
if (SockGets(socket, buf,sizeof(buf)) < 0)
return(PS_SOCKET);
int POP2_stateGREET (socket)
int socket;
{
- char buf [POPBUFSIZE];
+ char buf [POPBUFSIZE+1];
/* read the greeting from the server */
if (SockGets(socket, buf, sizeof(buf)) >= 0) {
int socket;
{
int number;
- char buf [POPBUFSIZE];
+ char buf [POPBUFSIZE+1];
/* read the NMBR (#ccc) message from the server */
if (SockGets(socket, buf, sizeof(buf)) >= 0) {
int socket;
{
int msgsize;
- char buf [POPBUFSIZE];
+ char buf [POPBUFSIZE+1];
/* read the SIZE message (=ccc) from the server */
if (SockGets(socket, buf, sizeof(buf)) >= 0)
int topipe;
{
int i,buflen,actsize;
- char buf [MSGBUFSIZE];
- char frombuf [MSGBUFSIZE];
+ char buf [MSGBUFSIZE+1];
+ char frombuf [MSGBUFSIZE+1];
char savec;
int msgTop;
int needFrom;
int socket;
{
int ok;
- char buf [POPBUFSIZE];
+ char buf [POPBUFSIZE+1];
char *bufp;
if (SockGets(socket, buf, sizeof(buf)) >= 0) {
struct hostrec *queryctl;
char *greeting;
{
- char buf [POPBUFSIZE];
+ char buf [POPBUFSIZE+1];
#if defined(HAVE_APOP_SUPPORT)
/* build MD5 digest from greeting timestamp + password */
*firstp = 1;
use_uidl = 0;
if (!queryctl->fetchall) {
- char buf [POPBUFSIZE];
- char id [IDLEN];
+ char buf [POPBUFSIZE+1];
+ char id [IDLEN+1];
int num;
/* try LAST first */
int socket;
{
int ok;
- char buf [POPBUFSIZE];
+ char buf [POPBUFSIZE+1];
int totalsize;
SockPrintf(socket,"STAT\r\n");