aboutsummaryrefslogtreecommitdiffstats
path: root/pop2.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>1996-09-23 05:56:18 +0000
committerEric S. Raymond <esr@thyrsus.com>1996-09-23 05:56:18 +0000
commit897cad3662024798463bc418bddaac801228da76 (patch)
treebdb615c5380cef3df6a35679f28fc9044287d449 /pop2.c
parent7776e2819833e302f654f7bfd34ff2c26b63460a (diff)
downloadfetchmail-897cad3662024798463bc418bddaac801228da76.tar.gz
fetchmail-897cad3662024798463bc418bddaac801228da76.tar.bz2
fetchmail-897cad3662024798463bc418bddaac801228da76.zip
Better protection against buffer overruns.
svn path=/trunk/; revision=106
Diffstat (limited to 'pop2.c')
-rw-r--r--pop2.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/pop2.c b/pop2.c
index 26bc1ea9..5b27e918 100644
--- a/pop2.c
+++ b/pop2.c
@@ -311,7 +311,7 @@ int 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) {
@@ -356,7 +356,7 @@ int POP2_stateNMBR (socket)
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) {
@@ -405,7 +405,7 @@ int POP2_stateSIZE (socket)
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)
@@ -463,8 +463,8 @@ int mboxfd;
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;