From af19de31018421c3deea655dacca64211a6eb327 Mon Sep 17 00:00:00 2001 From: David Benjamin Date: Sun, 11 Jan 2015 19:50:31 -0500 Subject: [PATCH] Fix the test async_bio in datagram mode. write_quota should only be decremented by 1 in datagram mode, otherwise we'll underflow and always allow writes through. This does not cause any existing tests to fail. (It will be useful once the bug in dtls1_do_write is fixed.) Change-Id: I42aa001d7264790a3726269890635f679497fb1c Reviewed-on: https://boringssl-review.googlesource.com/2831 Reviewed-by: Adam Langley --- ssl/test/async_bio.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ssl/test/async_bio.cc b/ssl/test/async_bio.cc index 48615790f..88f8e9aec 100644 --- a/ssl/test/async_bio.cc +++ b/ssl/test/async_bio.cc @@ -61,7 +61,7 @@ static int async_write(BIO *bio, const char *in, int inl) { if (ret <= 0) { BIO_copy_next_retry(bio); } else { - a->write_quota -= ret; + a->write_quota -= (a->datagram ? 1 : ret); } return ret; }