diff options
author | Matthias Andree <matthias.andree@gmx.de> | 2004-12-22 09:43:39 +0000 |
---|---|---|
committer | Matthias Andree <matthias.andree@gmx.de> | 2004-12-22 09:43:39 +0000 |
commit | ce0baa186214cd0d22801a747fa3e204c82bea0c (patch) | |
tree | 6f4662a6ada86ecee30192f4b651667ef2acde09 /transact.c | |
parent | 58b3d0fd8c89e70b3f44dc86978a5ea99ece597f (diff) | |
download | fetchmail-ce0baa186214cd0d22801a747fa3e204c82bea0c.tar.gz fetchmail-ce0baa186214cd0d22801a747fa3e204c82bea0c.tar.bz2 fetchmail-ce0baa186214cd0d22801a747fa3e204c82bea0c.zip |
Check for SockWrite() return and bail out on short writes.
svn path=/trunk/; revision=4016
Diffstat (limited to 'transact.c')
-rw-r--r-- | transact.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -1503,7 +1503,10 @@ va_dcl va_end(ap); snprintf(buf+strlen(buf), sizeof(buf)-strlen(buf), "\r\n"); - SockWrite(sock, buf, strlen(buf)); + if (SockWrite(sock, buf, strlen(buf)) < strlen(buf)) { + /* short write, bail out */ + return PS_SOCKET; + } if (outlevel >= O_MONITOR) { |