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 <agl@google.com>
This commit is contained in:
committed by
Adam Langley
parent
17a5f85cbb
commit
af19de3101
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user