diff options
author | nelsonb%netscape.com <devnull@localhost> | 2004-01-08 06:52:00 +0000 |
---|---|---|
committer | nelsonb%netscape.com <devnull@localhost> | 2004-01-08 06:52:00 +0000 |
commit | 9397b88961ea84c2d48b8801d78ca6e434d7c71e (patch) | |
tree | 7de146edf039cd87930c3bba96d37854bb097bcb | |
parent | c404320492a920902d3f4374206a75a70e69280b (diff) | |
download | nss-hg-9397b88961ea84c2d48b8801d78ca6e434d7c71e.tar.gz |
Overload the error code SSL_ERROR_RX_RECORD_TOO_LONG to report SSL2
records that are too short. Bugscape bug 54814
-rw-r--r-- | security/nss/lib/ssl/sslgathr.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/security/nss/lib/ssl/sslgathr.c b/security/nss/lib/ssl/sslgathr.c index 9f06a25e3..1e0253c8b 100644 --- a/security/nss/lib/ssl/sslgathr.c +++ b/security/nss/lib/ssl/sslgathr.c @@ -195,6 +195,10 @@ ssl2_GatherData(sslSocket *ss, sslGather *gs, int flags) /* is_escape = (gs->hdr[0] & 0x40) != 0; */ gs->recordPadding = gs->hdr[2]; } + if (!gs->count) { + PORT_SetError(SSL_ERROR_RX_RECORD_TOO_LONG); + goto cleanup; + } if (gs->count > gs->buf.space) { err = sslBuffer_Grow(&gs->buf, gs->count); |