From 897cad3662024798463bc418bddaac801228da76 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Mon, 23 Sep 1996 05:56:18 +0000 Subject: Better protection against buffer overruns. svn path=/trunk/; revision=106 --- fetchmail.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'fetchmail.c') diff --git a/fetchmail.c b/fetchmail.c index 3b9dfc1c..f25ca98c 100644 --- a/fetchmail.c +++ b/fetchmail.c @@ -139,7 +139,7 @@ char **argv; 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, "-"); @@ -339,7 +339,7 @@ struct hostrec *queryctl; 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; -- cgit v1.2.3