diff options
author | Robert Swiecki <robert@swiecki.net> | 2015-05-18 19:08:02 -0400 |
---|---|---|
committer | Rich Salz <rsalz@openssl.org> | 2015-05-19 07:20:18 -0400 |
commit | cdcb94eea7533da2d67e0fc8d393829a2498f1ad (patch) | |
tree | e7b58b0d87c238bd5dec4fe40fb2db06a377b6e0 /apps/s_server.c | |
parent | 051b41df4105355a5a9c7f1c0bd00cc70b2d324c (diff) |
Don't add write errors into bytecounts
Signed-off-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(cherry picked from commit 00d565cfbe90fab3b157e644caca4eb4a2ebec79)
Diffstat (limited to 'apps/s_server.c')
-rw-r--r-- | apps/s_server.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/apps/s_server.c b/apps/s_server.c index 5d58fe0bdf..e66272096c 100644 --- a/apps/s_server.c +++ b/apps/s_server.c @@ -2455,8 +2455,10 @@ static int sv_body(char *hostname, int s, int stype, unsigned char *context) ret = 1; goto err; } - l += k; - i -= k; + if (k > 0) { + l += k; + i -= k; + } if (i <= 0) break; } |