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:19:38 -0400 |
commit | 00d565cfbe90fab3b157e644caca4eb4a2ebec79 (patch) | |
tree | 73110ed3c9b7754d7d621def001228cd1202b996 /apps | |
parent | 6383d31645c6381817f26e2997b8bf58ec903edb (diff) |
Don't add write errors into bytecounts
Signed-off-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
Diffstat (limited to 'apps')
-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 61d13f3e0a..e46376db4c 100644 --- a/apps/s_server.c +++ b/apps/s_server.c @@ -2290,8 +2290,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; } |