Merge in the latest changes from 0.9.6d-stable.

This commit is contained in:
Richard Levitte
2002-04-17 07:02:47 +00:00
parent 7525ac5aba
commit c1fb6557e5
16 changed files with 349 additions and 79 deletions

View File

@@ -56,7 +56,7 @@
* [including the GNU Public Licence.]
*/
/* ====================================================================
* Copyright (c) 1998-2000 The OpenSSL Project. All rights reserved.
* Copyright (c) 1998-2002 The OpenSSL Project. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -572,6 +572,7 @@ int ssl3_setup_buffers(SSL *s)
{
unsigned char *p;
unsigned int extra;
size_t len;
if (s->s3->rbuf.buf == NULL)
{
@@ -579,18 +580,21 @@ int ssl3_setup_buffers(SSL *s)
extra=SSL3_RT_MAX_EXTRA;
else
extra=0;
if ((p=OPENSSL_malloc(SSL3_RT_MAX_PACKET_SIZE+extra))
== NULL)
len = SSL3_RT_MAX_PACKET_SIZE + extra;
if ((p=OPENSSL_malloc(len)) == NULL)
goto err;
s->s3->rbuf.buf=p;
s->s3->rbuf.buf = p;
s->s3->rbuf_len = len;
}
if (s->s3->wbuf.buf == NULL)
{
if ((p=OPENSSL_malloc(SSL3_RT_MAX_PACKET_SIZE))
== NULL)
len = SSL3_RT_MAX_PACKET_SIZE;
len += SSL3_RT_HEADER_LENGTH + 256; /* extra space for empty fragment */
if ((p=OPENSSL_malloc(len)) == NULL)
goto err;
s->s3->wbuf.buf=p;
s->s3->wbuf.buf = p;
s->s3->wbuf_len = len;
}
s->packet= &(s->s3->rbuf.buf[0]);
return(1);