summaryrefslogtreecommitdiff
path: root/security/nss/lib/ssl/ssl3gthr.c
diff options
context:
space:
mode:
Diffstat (limited to 'security/nss/lib/ssl/ssl3gthr.c')
-rw-r--r--security/nss/lib/ssl/ssl3gthr.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/security/nss/lib/ssl/ssl3gthr.c b/security/nss/lib/ssl/ssl3gthr.c
index 909850e94..2937e6c3c 100644
--- a/security/nss/lib/ssl/ssl3gthr.c
+++ b/security/nss/lib/ssl/ssl3gthr.c
@@ -76,6 +76,7 @@ ssl3_GatherData(sslSocket *ss, sslGather *gs, int flags)
gs->offset = 0;
gs->writeOffset = 0;
gs->readOffset = 0;
+ gs->inbuf.len = 0;
}
lbp = gs->inbuf.buf;
@@ -108,8 +109,9 @@ ssl3_GatherData(sslSocket *ss, sslGather *gs, int flags)
}
gs->offset += nb;
- gs->inbuf.len += nb;
gs->remainder -= nb;
+ if (gs->state == GS_DATA)
+ gs->inbuf.len += nb;
/* if there's more to go, read some more. */
if (gs->remainder > 0) {