diff options
author | nectar <nectar@FreeBSD.org> | 2002-07-30 12:44:15 +0000 |
---|---|---|
committer | nectar <nectar@FreeBSD.org> | 2002-07-30 12:44:15 +0000 |
commit | 050218e0d0c68a2e1a37afaab11e3c586d4f1b7d (patch) | |
tree | 923cfb7864437086b0894ec802dea54af2f73581 /crypto/openssl/ssl/ssltest.c | |
parent | ef94fba97d02831a278eed043f886d0fdddabf34 (diff) | |
parent | 0aed2eea83b351d68092e43b5a9496ce3dd5043d (diff) | |
download | FreeBSD-src-050218e0d0c68a2e1a37afaab11e3c586d4f1b7d.zip FreeBSD-src-050218e0d0c68a2e1a37afaab11e3c586d4f1b7d.tar.gz |
This commit was generated by cvs2svn to compensate for changes in r100928,
which included commits to RCS files with non-trunk default branches.
Diffstat (limited to 'crypto/openssl/ssl/ssltest.c')
-rw-r--r-- | crypto/openssl/ssl/ssltest.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/crypto/openssl/ssl/ssltest.c b/crypto/openssl/ssl/ssltest.c index 2ef8a50..5f91ed1 100644 --- a/crypto/openssl/ssl/ssltest.c +++ b/crypto/openssl/ssl/ssltest.c @@ -848,10 +848,10 @@ int doit_biopair(SSL *s_ssl, SSL *c_ssl, long count, if (num > 1) --num; /* test restartability even more thoroughly */ - r = BIO_nwrite(io1, &dataptr, (int)num); + r = BIO_nwrite0(io1, &dataptr); assert(r > 0); - assert(r <= (int)num); - num = r; + if (r < (int)num) + num = r; r = BIO_read(io2, dataptr, (int)num); if (r != (int)num) /* can't happen */ { @@ -860,6 +860,13 @@ int doit_biopair(SSL *s_ssl, SSL *c_ssl, long count, goto err; } progress = 1; + r = BIO_nwrite(io1, &dataptr, (int)num); + if (r != (int)num) /* can't happen */ + { + fprintf(stderr, "ERROR: BIO_nwrite() did not accept " + "BIO_nwrite0() bytes"); + goto err; + } if (debug) printf((io2 == client_io) ? |