Fix ssl3_get_message to handle message fragmentation correctly.

This commit is contained in:
Bodo Möller
2001-10-15 17:42:43 +00:00
parent 1147fa5a5f
commit 2dbdcd9734
2 changed files with 5 additions and 0 deletions

View File

@@ -4,6 +4,10 @@
Changes between 0.9.6b and 0.9.6c [XX xxx XXXX] Changes between 0.9.6b and 0.9.6c [XX xxx XXXX]
*) Fix ssl3_get_message (ssl/s3_both.c) to handle message fragmentation
correctly.
[Bodo Moeller]
*) Avoid infinite loop in ssl3_get_message (ssl/s3_both.c) if a *) Avoid infinite loop in ssl3_get_message (ssl/s3_both.c) if a
client receives HelloRequest while in a handshake. client receives HelloRequest while in a handshake.
[Bodo Moeller; bug noticed by Andy Schneider <andy.schneider@bjss.co.uk>] [Bodo Moeller; bug noticed by Andy Schneider <andy.schneider@bjss.co.uk>]

View File

@@ -436,6 +436,7 @@ long ssl3_get_message(SSL *s, int st1, int stn, int mt, long max, int *ok)
/* next state (stn) */ /* next state (stn) */
p=(unsigned char *)s->init_buf->data; p=(unsigned char *)s->init_buf->data;
n=s->s3->tmp.message_size; n=s->s3->tmp.message_size;
n -= s->init_num;
while (n > 0) while (n > 0)
{ {
i=ssl3_read_bytes(s,SSL3_RT_HANDSHAKE,&p[s->init_num],n,0); i=ssl3_read_bytes(s,SSL3_RT_HANDSHAKE,&p[s->init_num],n,0);