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 /pop2.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 'pop2.c')
-rw-r--r-- | pop2.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -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; |