diff options
author | Eric S. Raymond <esr@thyrsus.com> | 1996-09-23 05:56:18 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 1996-09-23 05:56:18 +0000 |
commit | 897cad3662024798463bc418bddaac801228da76 (patch) | |
tree | bdb615c5380cef3df6a35679f28fc9044287d449 /fetchmail.c | |
parent | 7776e2819833e302f654f7bfd34ff2c26b63460a (diff) | |
download | fetchmail-897cad3662024798463bc418bddaac801228da76.tar.gz fetchmail-897cad3662024798463bc418bddaac801228da76.tar.bz2 fetchmail-897cad3662024798463bc418bddaac801228da76.zip |
Better protection against buffer overruns.
svn path=/trunk/; revision=106
Diffstat (limited to 'fetchmail.c')
-rw-r--r-- | fetchmail.c | 4 |
1 files changed, 2 insertions, 2 deletions
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; |